<!-- https://staircase.co/products/contract/lexicon -->
# Lexicon

# Lexicon

The canonical mortgage ontology, published as a product: the class dictionary every other product's request and response is a subset of.

A caller queries the model — classes, properties, relationships, enumerations — and validates a payload against it. The classes themselves are documented under Data; this product is the surface that serves and enforces them.

Two validation modes exist. A syntactic shape constrains datatype, enumeration membership, pattern, length and range. A semantic shape carries conditional rules: if a borrower's marital status is married, the spouse's name becomes required. A record is valid only when it satisfies both.

## How it works

The model is a graph rather than a relational schema, and it is flat: no class nests another. A relationship between two classes is itself a class, whose properties are the object properties joining them. That keeps every class independently addressable and lets a relationship carry its own attributes, which a foreign key cannot.

Naming is governed by a written style guide rather than by convention. Property suffixes are load-bearing — an indicator is boolean, an identifier is an identifier, a type is an enumeration whose range is a named enumeration set — so a property's type is legible from its name before its definition is read.

Definitions are required to be complete sentences that define the term, not expand the acronym. The stated reason on record is future use by a conversational system: a glossary stub transfers nothing to a model reading it.

Identity is immutable. Every state of an entity is a new database-generated identifier, and a stable global identifier groups every state of the same real-world thing. Reading history is therefore a query rather than an audit table.

The model has a deprecation pipeline: duplicate analysis, impact analysis across every consumer of a class, automatic upcasting of a caller's payload to the current model, and usage monitoring of classes on the way out. Several executed removals are recorded with their own runbooks.

## Operations

The shape queries take a product API identifier, a schema type of request or response, a shape type of syntactic or semantic, and the model name — because a product's contract is itself a derived view of the model rather than a separate document.

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

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

`POST` `/1003`

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

#### Loan Application
<!--/source-->

`generateURLADocument`

<!--source:api-specifications-->
Generate URLA(1003, Loan Application) Document.
<!--/source-->

<!--source:api-specifications-->
This endpoint allows user to generate URLA(1003, Loan Application) Document. The input is Staircase collection described below. The output is a download link to the generated document.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "people": [
 {
 "@id": "01HHEEBDSDHQK6H2FB884BDY3F",
 "@type": "person",
 "birth_day": "15",
 "birth_month": "7",
 "birth_year": "1980",
 "full_name": "John Doe",
 "has_alias": "01HHEEBDS89MPT7HCP0MBVX9GC",
 "has_dependent": [
 "01HHEEBDSBXFETBGCMY9KPRXXE",
 "01HHEEBDSCTQ2SCQ3WQ517CH87"
 ],
 "marital_status_type": "Married",
 "ssn": "123456789",
 "us_citizenship_status": "USCitizen"
 },
 {
 "@id": "01HHEEBDS89MPT7HCP0MBVX9GC",
 "@type": "person",
 "full_name": "Johnny, JD"
 },
 {
 "@id": "01HHEEBDSCTQ2SCQ3WQ517CH87",
 "@type": "person",
 "age": 8
 },
 {
 "@id": "01HHEEBDSBXFETBGCMY9KPRXXE",
 "@type": "person",
 "age": 10
 }
 ],
 "residences": [
 {
 "@id": "01HHEEBDS9QTEXDP9QVBB1MYFN",
 "@type": "residence",
 "has_address": "01HHEEBDS9D8ZH0NG7J8K20YVE7",
 "has_resident": "01HHEEBDSDHQK6H2FB884BDY3F",
 "residency_basis_type": "Rent",
 "residency_duration_years_count": 2,
 "residency_type": "Current",
 "has_expense": "01HKMHPJ6TSMZQDPNRAHZYV9VN"
 },
 {
 "@id": "01HHEEBDS9D8ZH0NG7J8K20YVE5",
 "@type": "residence",
 "has_address": "01HHEEBDS87XJ4XXSHBRMMWWCY",
 "has_resident": "01HHEEBDSDHQK6H2FB884BDY3F",
 "residency_basis_type": "Own",
 "residency_duration_months_count": 6,
 "residency_duration_years_count": 3,
 "residency_type": "Prior"
 }
 ],
 "expenses": [
 {
 "@id": "01HKMHPJ6TSMZQDPNRAHZYV9VN",
 "@type": "expense",
 "expense_monthly_payment_amount": 1000
 }
 ],
 "addresses": [
 {
 "@id": "01HHEEBDS9D8ZH0NG7J8K20YVE7",
 "@type": "address",
 "address_line_1": "123 Main St",
 "city_name": "Anytown",
 "country_name": "USA",
 "postal_code": "12345",
 "state_code": "AL",
 "unit_identifier": "Unit 101"
 },
 {
 "@id": "01HHEEBDS87XJ4XXSHBRMMWWCY",
 "@type": "address",
 "address_line_1": "456 Old St",
 "city_name": "Oldtown",
 "country_name": "USA",
 "postal_code": "54321",
 "state_code": "AK",
 "unit_identifier": "Unit 202"
 },
 {
 "@id": "01HHEEBDSBV3Q1J8YCKYNTYZ2T",
 "@type": "address",
 "address_line_1": "789 Postal St",
 "city_name": "Mailville",
 "country_name": "USA",
 "postal_code": "67890",
 "state_code": "AZ",
 "unit_identifier": "Box 303"
 },
 {
 "@id": "01HHEEBDSBAYVZ7EKP7N5FPTK21",
 "@type": "address",
 "address_line_1": "100 Solar Way",
 "city_name": "Sunnyville",
 "country_name": "USA",
 "postal_code": "93001",
 "state_code": "CA",
 "unit_identifier": "Suite 500"
 },
 {
 "@id": "01HHEEBDSAYEBGX1PSGNEDFN4Q",
 "@type": "address",
 "address_line_1": "20 Commerce Blvd",
 "city_name": "Businesstown",
 "country_name": "USA",
 "postal_code": "20202",
 "state_code": "AS",
 "unit_identifier": "Suite 2"
 },
 {
 "@id": "01HKKY764AT0AD029K7W34EECB",
 "@type": "address",
 "address_line_1": "123 Main St",
 "city_name": "Anytown",
 "country_name": "US",
 "postal_code": "12345",
 "state_code": "CA",
 "unit_identifier": "Unit 5"
 },
 {
 "@id": "01HKKZ88Y0563MGWSV945J406B",
 "@type": "address",
 "address_line_1": "456 Oak Street",
 "city_name": "Springfield",
 "country_name": "US",
 "postal_code": "65432",
 "state_code": "NY",
 "unit_identifier": "Apt 202"
 }
 ],
 "communications": [
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P8",
 "@type": "communication",
 "has_mailing_address": "01HHEEBDSBV3Q1J8YCKYNTYZ2T",
 "contact_person": "01HHEEBDSDHQK6H2FB884BDY3F",
 "home_phone_number": "1234567890",
 "phone_number": "2345678901",
 "work_phone_number": "3456789012"
 },
 {
 "@id": "01HHEEBDS82QCSZEDWFSAPGHRF",
 "@type": "communication",
 "phone_number": "555101111"
 },
 {
 "@id": "01HHEEBDSBAYVZ7EKP7N5FPTK24",
 "@type": "communication",
 "phone_number": "555202222"
 }
 ],
 "employments": [
 {
 "@id": "01HHEEBDSBRYRXXGXZ55JJMPVW",
 "@type": "employment",
 "associated_income": "01HHEEBDS9D8ZH0NG7J8K20YVE9",
 "employment_end_date": "2020-12-31",
 "employment_start_date": "2018-03-15",
 "employment_status_type": "Previous",
 "has_employee": "01HHEEBDSDHQK6H2FB884BDY3F",
 "has_employer": "01HHEEBDS98S79HQ6JESFG93JZ",
 "position_title": "Environmental Engineer",
 "self_employment_indicator": false
 },
 {
 "@id": "01HHEEBDSBT17PNE759GJ25PGG",
 "@type": "employment",
 "associated_income": [
 "01HHEEBDS9GK1DHGS07GXP06ZV6",
 "01HHEEBDSARWSDN7DN6RY72Y4X",
 "01HHEEBDS855MCXMMK2HRP5ESH",
 "01HHEEBDS9GK1DHGS07GXP06ZV4",
 "01HHEEBDS9GK1DHGS07GXP06ZV5",
 "01HHEEBDS9GK1DHGS07GXP06ZV7"
 ],
 "employment_start_date": "2010-01-10",
 "employment_status_type": "Current",
 "employment_time_in_line_of_work_years_count": 3,
 "has_employee": "01HHEEBDSDHQK6H2FB884BDY3F",
 "has_employer": "01HHEEBDSB27TBFYPCF2XQ8J11",
 "ownership_interest_type": "GreaterThanOrEqualTo25Percent",
 "position_title": "Manager",
 "self_employment_indicator": true,
 "special_borrower_employer_relationship_indicator": true,
 "time_in_line_of_work_months_count": 2
 },
 {
 "@id": "01HHEEBDSBH00GD7716WZ1AF98",
 "@type": "employment",
 "associated_income": [
 "01HHEEBDSAZ357ZQKYTDE2S6Q5",
 "01HHEEBDSD1438AFBY9K2VCKZY1",
 "01HHEEBDS9GK1DHGS07GXP06ZV8",
 "01HHEEBDSB9EFK3PH3SWWJCGH9",
 "01HHEEBDSDMQ3RSY6K2Y9AHEMG",
 "01HHEEBDS9GK1DHGS07GXP06ZV9"
 ],
 "employment_start_date": "2015-06-15",
 "employment_status_type": "Current",
 "employment_time_in_line_of_work_years_count": 10,
 "has_employee": "01HHEEBDSDHQK6H2FB884BDY3F",
 "has_employer": "01HHEEBDSBVT47DCTAZ1T546WA",
 "position_title": "Senior Analyst",
 "self_employment_indicator": false,
 "special_borrower_employer_relationship_indicator": false,
 "time_in_line_of_work_months_count": 0
 }
 ],
 "incomes": [
 {
 "@id": "01HHEEBDS9D8ZH0NG7J8K20YVE9",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 6500,
 "income_type": "Base"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV3",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 450,
 "income_type": "DividendsInterest"
 },
 {
 "@id": "01HHEEBDS9MDSGMCN8M6KE9G4M",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 800,
 "income_type": "CapitalGains"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV1",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 1200,
 "income_type": "Alimony"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV9",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 0,
 "income_type": "Other"
 },
 {
 "@id": "01HHEEBDSAZ357ZQKYTDE2S6Q5",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 600,
 "income_type": "Overtime"
 },
 {
 "@id": "01HHEEBDSDMQ3RSY6K2Y9AHEMG",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 0,
 "income_type": "MilitaryBasePay"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV4",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 300,
 "income_type": "Bonuses"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV8",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 300,
 "income_type": "Bonuses"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV5",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 0,
 "income_type": "Other"
 },
 {
 "@id": "01HHEEBDSD1438AFBY9K2VCKZY1",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 100,
 "income_type": "Commissions"
 },
 {
 "@id": "01HHEEBDS855MCXMMK2HRP5ESH",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 200,
 "income_type": "Commissions"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV7",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 4000,
 "income_type": "Base"
 },
 {
 "@id": "01HHEEBDS9GK1DHGS07GXP06ZV6",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 500,
 "income_type": "Overtime"
 },
 {
 "@id": "01HHEEBDSB9EFK3PH3SWWJCGH9",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 5000,
 "income_type": "Base"
 },
 {
 "@id": "01HHEEBDSARWSDN7DN6RY72Y4X",
 "@type": "income",
 "income_recipient": "01HHEEBDSDHQK6H2FB884BDY3F",
 "income_amount": 0,
 "income_type": "MilitaryBasePay"
 }
 ],
 "companies": [
 {
 "@id": "01HHEEBDS98S79HQ6JESFG93JZ",
 "@type": "company",
 "has_address": "01HHEEBDSBAYVZ7EKP7N5FPTK21",
 "name": "GreenTech Innovations"
 },
 {
 "@id": "01HHEEBDSB27TBFYPCF2XQ8J11",
 "@type": "company",
 "has_address": "01HHEEBDS95T2CKY8KN0GK3EX4",
 "has_communication_method": "01HHEEBDS82QCSZEDWFSAPGHRF",
 "name": "Company One"
 },
 {
 "@id": "01HHEEBDSBVT47DCTAZ1T546WA",
 "@type": "company",
 "has_address": "01HHEEBDSAYEBGX1PSGNEDFN4Q",
 "has_communication_method": "01HHEEBDSBAYVZ7EKP7N5FPTK24",
 "name": "Company Two"
 },
 {
 "@id": "01HHEEBDS9V68J5NE6SQFWZXTA",
 "@type": "company",
 "name": "Credit Union C"
 },
 {
 "@id": "01HHEEBDSBAYVZ7EKP7N5FPTK29",
 "@type": "company",
 "name": "Bank A"
 },
 {
 "@id": "01HKKYNEXGQMZA6384RY4AF2DV",
 "@type": "company",
 "name": "ABC Lending"
 }
 ],
 "assets": [
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P4",
 "@type": "asset",
 "asset_account_identifier": "998877665",
 "asset_cash_or_market_value_amount": 35000,
 "asset_type": "MutualFund",
 "held_by_financial_institution": "01HHEEBDSBAYVZ7EKP7N5FPTK29",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P3",
 "@type": "asset",
 "asset_account_identifier": "123456789",
 "asset_cash_or_market_value_amount": 5000,
 "asset_type": "CheckingAccount",
 "held_by_financial_institution": "01HHEEBDSBAYVZ7EKP7N5FPTK29",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P5",
 "@type": "asset",
 "asset_account_identifier": "987654321",
 "asset_cash_or_market_value_amount": 15000,
 "asset_type": "SavingsAccount",
 "held_by_financial_institution": "01HHEEBDS9V68J5NE6SQFWZXTA",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P7",
 "@type": "asset",
 "asset_account_identifier": "556677889",
 "asset_cash_or_market_value_amount": 45000,
 "asset_type": "Stock",
 "held_by_financial_institution": "01HHEEBDS9V68J5NE6SQFWZXTA",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P6",
 "@type": "asset",
 "asset_account_identifier": "112233445",
 "asset_cash_or_market_value_amount": 25000,
 "asset_type": "MoneyMarketFund",
 "held_by_financial_institution": "01HHEEBDS9V68J5NE6SQFWZXTA",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDSCSCMK10J7CK7ZAFM7",
 "@type": "asset",
 "asset_cash_or_market_value_amount": 100000,
 "asset_type": "PendingNetSaleProceedsFromRealEstateAssets",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P1",
 "@type": "asset",
 "asset_cash_or_market_value_amount": 5000,
 "asset_type": "ProceedsFromSaleOfNonRealEstateAsset",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDSD3APA7QJJRQGJTNDB",
 "@type": "asset",
 "asset_cash_or_market_value_amount": 15000,
 "asset_liquidity_indicator": false,
 "asset_type": "GiftOfPropertyEquity",
 "funds_source_type": "Employer",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 },
 {
 "@id": "01HHEEBDSCN405T3MK0MPBW2K1",
 "@type": "asset",
 "asset_cash_or_market_value_amount": 10000,
 "asset_liquidity_indicator": true,
 "asset_type": "GiftOfCash",
 "funds_source_type": "Relative",
 "possessed_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 }
 ],
 "liabilities": [
 {
 "@id": "01HHEEBDS82E4FXB7XKB2EFN54",
 "@type": "liability",
 "has_liability_timeline": "01HHEEBDS84EHE26GE3JDCXYWG",
 "has_liability_holder": "01HHEEBDSDHQK6H2FB884BDY3F",
 "liability_account_identifier": "12340002",
 "liability_monthly_payment_amount": 300,
 "liability_payoff_status_indicator": true,
 "liability_type": "Installment",
 "owed_to": "01HHEEBDS9V68J5NE6SQFWZXTA"
 },
 {
 "@id": "01HHEEBDS9RXSCP5F72MAN3AB75",
 "@type": "liability",
 "has_liability_timeline": "01HKKXH29GPH21N38PPCXEZ2HK",
 "has_liability_holder": "01HHEEBDSDHQK6H2FB884BDY3F",
 "liability_account_identifier": "12340001",
 "liability_monthly_payment_amount": 150,
 "liability_payoff_status_indicator": true,
 "liability_type": "Revolving",
 "owed_to": "01HHEEBDS9V68J5NE6SQFWZXTA"
 },
 {
 "@id": "01HHEEBDS9RXSCP5F72MAN3AB79",
 "@type": "liability",
 "has_liability_timeline": "01HKKXH9604TFHK6CP8E8VXE5A",
 "has_liability_holder": "01HHEEBDSDHQK6H2FB884BDY3F",
 "liability_account_identifier": "12340003",
 "liability_monthly_payment_amount": 100,
 "liability_payoff_status_indicator": true,
 "liability_type": "Open30DayChargeAccount",
 "owed_to": "01HHEEBDS9V68J5NE6SQFWZXTA"
 }
 ],
 "liability_timelines": [
 {
 "@id": "01HHEEBDS84EHE26GE3JDCXYWG",
 "@type": "liability_timeline",
 "liability_unpaid_balance_amount": 10000
 },
 {
 "@id": "01HKKXH29GPH21N38PPCXEZ2HK",
 "@type": "liability_timeline",
 "liability_unpaid_balance_amount": 8000
 },
 {
 "@id": "01HKKXH9604TFHK6CP8E8VXE5A",
 "@type": "liability_timeline",
 "liability_unpaid_balance_amount": 6000
 }
 ],
 "settlements": [
 {
 "@id": "01HKKYP4GK210SDCYCZZ8TT8N1",
 "@type": "settlement",
 "has_loan": "01HKKYMREK90A70C6KKSPCH6H1",
 "has_ownership": "01HKKYJYNCN5NFV5E62D538B6W",
 "has_company": "01HKKYNEXGQMZA6384RY4AF2DV"
 }
 ],
 "loans": [
 {
 "@id": "01HKKYMREK90A70C6KKSPCH6H1",
 "@type": "loan",
 "monthly_payment": 1500,
 "has_loan_timeline": "01HKKYMDAYMK31Q67DHCYF1MAW",
 "mortgage_type": "Conventional"
 },
 {
 "@id": "01HKKYVNHW67R39873M8AEN4MC",
 "@type": "loan",
 "base_loan_amount": 300000,
 "loan_purpose_type": "Purchase"
 }
 ],
 "loan_timelines": [
 {
 "@id": "01HKKYMDAYMK31Q67DHCYF1MAW",
 "@type": "loan_timeline",
 "unpaid_balance_amount": 200000
 }
 ],
 "ownerships": [
 {
 "@id": "01HKKYJYNCN5NFV5E62D538B6W",
 "@type": "ownership",
 "owned_property": "01HKKYHSWWTDV943CM8BCE67JH",
 "owned_by": "01HHEEBDSDHQK6H2FB884BDY3F"
 }
 ],
 "properties": [
 {
 "@id": "01HKKYHSWWTDV943CM8BCE67JH",
 "@type": "property",
 "has_address": "01HKKY764AT0AD029K7W34EECB",
 "property_estimated_value_amount": 500000,
 "property_current_usage_type": "PrimaryResidence",
 "owned_property_maintenance_expense_amount": 300,
 "owned_property_disposition_status_type": "Retain",
 "owned_property_rental_income_gross_amount": 0
 },
 {
 "@id": "01HKKYWF88WAB9QTZ6ZJTXX3CM",
 "@type": "property",
 "has_address": "01HKKZ88Y0563MGWSV945J406B",
 "accessory_unit_count": 1,
 "property_estimated_value_amount": 350000,
 "property_current_usage_type": "PrimaryResidence",
 "fha_secondary_residence_indicator": false,
 "property_mixed_usage_indicator": false,
 "manufactured_home_indicator": false,
 "rental_estimated_gross_monthly_rent_amount": 0
 }
 ],
 "relationships": [
 {
 "@type": "finance_relation",
 "has_person": "01HHEEBDSDHQK6H2FB884BDY3F",
 "has_loan": "01HKKYMREK90A70C6KKSPCH6H1",
 "has_property": "01HKKYHSWWTDV943CM8BCE67JH",
 "role": "Borrower"
 },
 {
 "@type": "finance_relation",
 "has_company": "01HKKYNEXGQMZA6384RY4AF2DV",
 "has_loan": "01HKKYMREK90A70C6KKSPCH6H1",
 "role": "Lender"
 },
 {
 "@type": "finance_relation",
 "has_person": "01HHEEBDSDHQK6H2FB884BDY3F",
 "has_loan": "01HKKYVNHW67R39873M8AEN4MC",
 "has_property": "01HKKYWF88WAB9QTZ6ZJTXX3CM",
 "role": "Borrower"
 }
 ],
 "leads": [
 {
 "@id": "01HKKZ77VKJKB0XNA9PZR9CK5T",
 "@type": "lead",
 "has_property": "01HKKYWF88WAB9QTZ6ZJTXX3CM",
 "has_loan": "01HKKYVNHW67R39873M8AEN4MC"
 }
 ],
 "declarations": [
 {
 "@id": "01HHEEBDS8G6X59BPK9G7E9N7P9",
 "@type": "declaration",
 "has_person": "01HHEEBDSDHQK6H2FB884BDY3F",
 "intent_to_occupy_indicator": true,
 "homeowner_past_three_years_indicator": true,
 "prior_property_title_type": "JointWithSpouse",
 "prior_property_usage_type": "PrimaryResidence",
 "special_borrower_seller_relationship_indicator": true,
 "undisclosed_borrowed_funds_indicator": true,
 "undisclosed_borrowed_funds_amount": 50000,
 "undisclosed_mortgage_application_indicator": false,
 "undisclosed_credit_application_indicator": false,
 "property_proposed_clean_energy_lien_indicator": true,
 "undisclosed_comaker_of_note_indicator": false,
 "outstanding_judgments_indicator": false,
 "presently_delinquent_indicator": false,
 "party_to_lawsuit_indicator": true,
 "prior_property_deed_in_lieu_conveyed_indicator": false,
 "prior_property_short_sale_completed_indicator": false,
 "prior_property_foreclosure_completed_indicator": true,
 "bankruptcy_indicator": true
 }
 ],
 "military_services": [
 {
 "@id": "01HHEEBDS9D8ZH0NG7J8K20YVE0",
 "@type": "military_service",
 "associated_with": "01HHEEBDSDHQK6H2FB884BDY3F",
 "military_service_expected_completion_date": "2025-12-31",
 "military_status_type": "ActiveDuty"
 }
 ],
 "government_monitoring": [
 {
 "@id": "01HHEEBDS9RXSCP5F72MAN3AB74",
 "@type": "government_monitoring",
 "represents": "01HHEEBDSDHQK6H2FB884BDY3F",
 "application_taken_method_type": "Internet",
 "ethnicity_collected_based_on_visual_observation_or_surname_indicator": false,
 "ethnicity_origin_type": "Other",
 "ethnicity_origin_type_other_description": "Salvadoran",
 "ethnicity_refusal_indicator": false,
 "ethnicity_type": "HispanicOrLatino",
 "gender_collected_based_on_visual_observation_or_name_indicator": false,
 "gender_refusal_indicator": false,
 "gender_type": "Male",
 "race_collected_based_on_visual_observation_or_surname_indicator": false,
 "race_refusal_indicator": false,
 "race_type": "AmericanIndianOrAlaskaNative",
 "race_type_additional_description": "Navajo"
 }
 ]
 }
}
```

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Successfully generated the document

```
{
 "code": 200,
 "message": "https://www.example.com/"
}
```

<!--/source-->

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

```
{
 "code": 400,
 "message": "Bad Request"
}
```

<!--/source-->

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

```
{
 "message": "Please check the key you used to call this service."
}
```

<!--/source-->

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

```
{
 "code": 422,
 "message": "Unprocessed Entity."
}
```

<!--/source-->

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully generated the document
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `number` | <!--source:api-specifications-->Status code<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Link to download the generated document<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Bad request error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

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

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

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

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

`POST` `/pre-approval`

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

#### Loan Application
<!--/source-->

`generatePreApprovalLetter`

<!--source:api-specifications-->
Generate Pre Approval Letter Document
<!--/source-->

<!--source:api-specifications-->
This endpoint allows user to generate pre approval letter document. Document. The input is Staircase collection described below. The output is a download link to the generated document.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "data": {
 "people": [
 {
 "@id": "_borrower",
 "@type": "person",
 "first_name": "Vladyslav",
 "middle_name": "J",
 "last_name": "Kartavets"
 },
 {
 "@id": "_borrower2",
 "@type": "person",
 "first_name": "Mariia",
 "last_name": "Kartavets"
 },
 {
 "@id": "_borrower3",
 "@type": "person",
 "first_name": "MMM",
 "last_name": "Kartavets"
 }
 ],
 "relationships": [
 {
 "@type": "finance_relation",
 "role": "Borrower",
 "has_loan": "_loan",
 "has_person": "_borrower"
 },
 {
 "@type": "finance_relation",
 "role": "CoBorrower",
 "has_loan": "_loan",
 "has_person": "_borrower2"
 },
 {
 "@type": "finance_relation",
 "role": "CoBorrower",
 "has_loan": "_loan",
 "has_person": "_borrower3"
 }
 ],
 "loans": [
 {
 "@id": "_loan",
 "@type": "loan",
 "has_property": "_property",
 "base_loan_amount": 425000,
 "note_rate_percent": 5.948,
 "loan_amortization_period_count": 30,
 "loan_amortization_period_type": "Year",
 "amortization_type": "Fixed",
 "rebate_percent": 1.1
 }
 ],
 "properties": [
 {
 "@id": "_property",
 "@type": "property",
 "has_address": "_address"
 }
 ],
 "addresses": [
 {
 "@id": "_address",
 "@type": "address",
 "address_line_1": "1452 N. Mustang Rd",
 "city_name": "Mustang",
 "state_code": "OK",
 "postal_code": "73604"
 }
 ]
 }
}
```

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Successfully generated the document

```
{
 "code": 200,
 "message": "https://www.example.com/"
}
```

<!--/source-->

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

```
{
 "code": 400,
 "message": "Bad Request"
}
```

<!--/source-->

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

```
{
 "message": "Please check the key you used to call this service."
}
```

<!--/source-->

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

```
{
 "code": 422,
 "message": "Unprocessed Entity."
}
```

<!--/source-->

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully generated the document
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `number` | <!--source:api-specifications-->Status code<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Link to download the generated document<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Bad request error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

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

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

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

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

`POST` `/xml`

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

#### Loan Application Mismo
<!--/source-->

`GenerateMismo`

<!--source:api-specifications-->
Create Mismo
<!--/source-->

<!--source:api-specifications-->
Generate Mismo FIle From Json

<!--/source-->

##### Request

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

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Retrieve mismo presigned_url

```
{
 "mismo_presigned_url": "presigned_url",
 "mismo_blob_id": "blob_id",
 "mismo_blob_name": "blob_name"
}
```

<!--/source-->

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

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

<!--/source-->

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

```
{
 "code": 422,
 "message": {
 "response": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
 }
}
```

<!--/source-->

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

```
{
 "message": "The product has encountered an internal server error. If you have used a transaction_id to call our services, please submit it to Staircase support"
}
```

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id` | `string` | <!--source:api-specifications-->Loan application transaction_id.<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Retrieve mismo presigned_url
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `string` | <!--source:api-specifications-->Status code for the api call.<!--/source--> |
| `message` | `object` | <!--source:api-specifications-->Mismo File<!--/source--> |
| `mismo_presigned_url` | `string` | <!--source:api-specifications-->Presigned_url to download the mismo file.<!--/source--> |
| `mismo_blob_id` | `string` | <!--source:api-specifications-->blob_id to download the mismo file.<!--/source--> |
| `mismo_blob_name` | `string` | <!--source:api-specifications-->blob_name for mismo file.<!--/source--> |

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

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

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

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

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

| Field | Type | Description |
| --- | --- | --- |
| `code` | `integer` | <!--source:api-specifications-->Status Code.<!--/source--> |
| `message` | `object` | <!--source:api-specifications-->Error Message.<!--/source--> |
| `response` | `string` | <!--source:api-specifications-->Response for the integrated product.<!--/source--> |

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

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

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

##### Other responses

`403`

`POST` `/listing-agreement`

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

#### Generate Listing Agreement Cancellation Document
<!--/source-->

`generateListingAgreementModification`

<!--source:api-specifications-->
This endpoint allows user to generate listing agreement cancellation document. The input is Staircase transaction identifier and lead identifier. The output is a download link to the generated document.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01J294HJWN2WV8FACHH7V4B4XN",
 "lead_id": "01J294HSCKRWKNGPBD7VAYSC3P"
}
```

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Successfully generated the document

```
{
 "code": 200,
 "message": "https://www.example.com/"
}
```

<!--/source-->

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

```
{
 "code": 400,
 "message": "Bad Request"
}
```

<!--/source-->

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

```
{
 "message": "Please check the key you used to call this service."
}
```

<!--/source-->

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

```
{
 "code": 422,
 "message": "Unprocessed Entity."
}
```

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction Identifer<!--/source--> |
| `lead_id`required | `string` | <!--source:api-specifications-->Lead Identifier<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully generated the document
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `number` | <!--source:api-specifications-->Status code<!--/source--> |
| `message` | `object` | <!--source:api-specifications-->Link to download the generated document and blob id<!--/source--> |
| `report_link`required | `string` | <!--source:api-specifications-->Link to the generated document<!--/source--> |
| `blob_id`required | `string` | <!--source:api-specifications-->Blob identifier<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Bad request error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

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

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

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

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

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

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

`POST` `/api-examples`

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

#### API Example Filtering Service
<!--/source-->

`filter_api_example`

<!--source:api-specifications-->
This API provides a way to filter existing examples, which are comprehensive instances of a model, according to specific criteria, such as product API language (schema). The examples are then returned as subsets in the product API's registered language.

The `generation_id` can be used to get the filtered example by the Get Api Example service.

Each schema data point should be added to Product API Languages List View

And, input body for generating example for one of the example collections on this schema should look like this:

```
{
 "product_api_identifier": "629abdf1-5fe1-4e7b-be30-eabcf9a157ae",
 "schema_type": "request",
 "example_language": "florida",
 "example_transaction_label": "01H5MBM1DTS7E2KTJW2YNEAA58"
}
```

example_transaction_label is example identifier in Lexicon Example Store

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "example_transaction_label": "01H4JF1F3BPX9TCTAAK9A3VA2A",
 "product_api_identifier": "01H4JF1F3BPX9TCTAAK9A3VA2B",
 "schema_type": "request",
 "output_language": "staircase-graph"
}
```

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Generation is succeeded.

```
{
 "generated_examples": [
 {
 "example_transaction_label": "01H4JF1F3BPX9TCTAAK9A3VA2A",
 "example_data": {
 "foo": "bar",
 "biz": [
 "baz",
 "booz"
 ]
 }
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Generation process is started successfully.

```
{
 "generation_id": "01H4JF1F3BPX9TCTAAK9A3VA2C"
}
```

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `example_transaction_label` | `string` | <!--source:api-specifications-->The label of the transaction that should be used to get the latest example collection.<!--/source--> |
| `product_api_identifier`required | `string` | <!--source:api-specifications-->The product API identifier.<!--/source--> |
| `schema_type`required | `string` | <!--source:api-specifications-->The type of the schema used for example to generate.<!--/source-->`request``response` |
| `example_language` | `string` | <!--source:api-specifications-->The language of the schema that should be applied to the example. Possible values are `lexicon` & `florida`.<!--/source--> |
| `output_language` | `string` | <!--source:api-specifications-->The output language of the generated example. The translation rules from example language to specified one must be defined in the `Language`.<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Generation is succeeded.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `generated_examples`required | `object[]` | <!--source:api-specifications-->Generated examples.<!--/source--> |
| `example_transaction_label`required | `string` | <!--source:api-specifications-->The identifier of the example.<!--/source--> |
| `example_data`required | `one of` | <!--source:api-specifications-->The generated example data.<!--/source--> |

##### Response `202``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Generation process is started successfully.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `generation_id`required | `string` | <!--source:api-specifications-->The identifier of the generation process.<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data is invalid.
<!--/source-->

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

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

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

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

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

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

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

`GET` `/api-examples/{generation_id}`

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

#### Get Api Filtered Example
<!--/source-->

`get_filtered_api_example`

<!--source:api-specifications-->
The service provides filtered example request by the call to the API Example Filtering Service service.

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Running200 Succeeded200 Failed
<!--/source-->

<!--source:api-specifications-->
application/json Copy Example is generated successfully

```
{
 "generation_id": "5f7b1b3a-0b0a-4b0a-9b0a-0b0a0b0a0b0c",
 "status": "RUNNING"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Example is generated successfully

```
{
 "generation_id": "01H4JF1F3BPX9TCTAAK9A3VA2C",
 "status": "COMPLETED",
 "generated_examples": [
 {
 "example_transaction_label": "01H4JF1F3BPX9TCTAAK9A3VA2A",
 "example_data": {
 "foo": "bar",
 "biz": [
 "baz",
 "booz"
 ]
 }
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Example is generated successfully

```
{
 "generation_id": "01H4JF1F3BPX9TCTAAK9A3VA2C",
 "status": "FAILED",
 "failure_reason": "The generation failed because of the failed translation to the `output_language`."
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `generation_id` required | `string` path | `01H4JF1F3BPX9TCTAAK9A3VA2C` | <!--source:api-specifications-->The identifier of the generation process.<!--/source--> |

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

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Example is generated successfully
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `generation_id`required | `string` | <!--source:api-specifications-->The identifier of the generation process.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->The status of the generation process.<!--/source-->`COMPLETED``FAILED``RUNNING` |
| `failure_reason` | `string` | <!--source:api-specifications-->The reason of the generation failure.<!--/source--> |
| `generated_examples` | `object[]` | <!--source:api-specifications-->Generated examples.<!--/source--> |
| `example_transaction_label`required | `string` | <!--source:api-specifications-->The identifier of the example.<!--/source--> |
| `example_data`required | `one of` | <!--source:api-specifications-->The generated example data.<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data is invalid.
<!--/source-->

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

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

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

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

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

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

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

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

### Lexicon
<!--/source-->

`GET` `/lexicon/documents`

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

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

`listDocuments`

<!--source:api-specifications-->
Returns the list of the available documents for labeling.

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `documents_count`required | `integer` | <!--source:api-specifications-->Count of documents<!--/source--> |
| `documents`required | `object[]` | <!--source:api-specifications-->Available documents.<!--/source--> |
| `document_type`required | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `fields_count` | `integer` | <!--source:api-specifications-->Count of fields<!--/source--> |
| `_links` | `object` | <!--source:api-specifications-->Links<!--/source--> |
| `fields` | `string` | <!--source:api-specifications-->Link to get document fields<!--/source--> |

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

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

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

`GET` `/lexicon/documents/{document_type}`

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

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

`getDocument`

<!--source:api-specifications-->
Returns the document information.

<!--/source-->

##### Parameters

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

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

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

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

| Field | Type | Description |
| --- | --- | --- |
| `document`required | `object` | <!--source:api-specifications-->Document<!--/source--> |
| `document_type`required | `string` | <!--source:api-specifications-->Document type<!--/source--> |
| `fields_count` | `integer` | <!--source:api-specifications-->Count of fields<!--/source--> |
| `fields`required | `object[]` | <!--source:api-specifications-->The array of all document root-level fields<!--/source--> |
| `base_class`required | `string` | <!--source:api-specifications-->The base class (parent type) of the document<!--/source--> |
| `container_name`required | `string` | <!--source:api-specifications-->The name of the container<!--/source--> |
| `properties`required | `object[]` | <!--source:api-specifications-->Fields of the document<!--/source--> |
| `name` | `string` | <!--source:api-specifications-->Field name<!--/source--> |
| `type` | `string` | <!--source:api-specifications-->Field type<!--/source--> |
| `enum` | `array` | <!--source:api-specifications-->Possible values for the field<!--/source--> |
| `relations`required | `object[]` | <!--source:api-specifications-->Relations of the document<!--/source--> |
| `property` | `string` | <!--source:api-specifications-->Name of the relation property<!--/source--> |
| `type` | `string` | <!--source:api-specifications-->The type of the related object<!--/source--> |
| `container_name` | `string` | <!--source:api-specifications-->Container name where the related object is located<!--/source--> |
| `types`required | `string[]` | <!--source:api-specifications-->Possible values of @type for this container.<!--/source--> |

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

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

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

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

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

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

`POST` `/lexicon/refresh`

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

#### Refresh GTL Lexicon
<!--/source-->

`refreshGtlLexicon`

<!--source:api-specifications-->
Forcibly refreshes the GTL lexicon according to the current Lexicon.

<!--/source-->

##### Response `202``application/json`

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

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

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

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

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

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

### Shapes
<!--/source-->

`POST` `/validation`

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

#### Validation
<!--/source-->

`shapeValidation`

<!--source:api-specifications-->
Validate your data with SHACL shapes
<!--/source-->

<!--source:api-specifications-->
This endpoint receives your data payload and a set of SHACL shapes, both supplied in JSON-LD format. The SHACL shapes define the constraints that the data should meet. On submission, the API validates the provided data against the supplied SHACL shapes and returns a report, providing detailed feedback on the data validation. The report includes a list of validation messages (invocations) and a boolean flag (conforms) indicating whether the data meets all the constraints defined in the SHACL shapes. The API is not domain-specific and can be used for validating any kind of data structure against any set of SHACL shapes. This makes it a powerful tool for ensuring data quality and compliance across various domains and use cases. If you're new to SHACL, you can learn more about it from the official SHACL specification.

<!--/source-->

##### Request

<!--source:api-specifications-->
Format ExampleRequired ExamplePattern ExampleEnumeration Example
<!--/source-->

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

```
{
 "request_payload": {
 "people": [
 {
 "@id": "sc:Bob",
 "@type": "person",
 "age": 20
 }
 ]
 },
 "shapes": {
 "@context": {
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/"
 },
 "@type": "sh:NodeShape",
 "sh:targetClass": {
 "@id": "sc:person"
 },
 "sh:property": [
 {
 "sh:path": {
 "@id": "sc:age"
 },
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#integer"
 }
 }
 ]
 }
}
```

<!--/source-->

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

```
{
 "request_payload": {
 "people": [
 {
 "@id": "01FD6ZKZD7WGZXYFGJBVPVP2Q5",
 "@type": "borrower",
 "has_first_name": {
 "has_value": "FirstName"
 },
 "has_last_name": {
 "has_value": "LastName"
 },
 "has_birth_date": {
 "has_value": "1972-09-03"
 },
 "has_taxpayer_identifier_value": {
 "has_value": "000000001"
 },
 "with_address": [
 "01FD6ZNGJADZ0RB1H96FSE8BAB"
 ],
 "contact_at": [
 "01FD6ZNGJW9X96WGWX2BD37CFY"
 ]
 }
 ],
 "addresses": [
 {
 "@id": "01FD6ZNGJADZ0RB1H96FSE8BAB",
 "@type": "address",
 "has_address_line_1_text": {
 "has_value": "1234 Address Line"
 },
 "has_address_line_2_text": {
 "has_value": ""
 },
 "has_city_name": {
 "has_value": "Someplace"
 },
 "has_state_code": {
 "has_value": "CA"
 },
 "has_postal_code": {
 "has_value": "93308"
 },
 "has_country_name": {
 "has_value": "US"
 }
 }
 ],
 "contact_information": [
 {
 "@id": "01FD6ZNGJW9X96WGWX2BD37CFY",
 "@type": "contact_information",
 "has_email_address": {
 "has_value": "test@test.com"
 }
 }
 ]
 },
 "shapes": {
 "@context": {
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@id": "sc:BorrowerShape",
 "@type": "sh:NodeShape",
 "sh:targetClass": {
 "@id": "sc:borrower"
 },
 "sh:property": [
 {
 "sh:path": {
 "@id": "sc:has_first_name"
 },
 "sh:node": {
 "sh:property": {
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:datatype": {
 "@id": "xsd:string"
 },
 "sh:minCount": 1
 }
 },
 "sh:minCount": 1
 },
 {
 "sh:path": {
 "@id": "sc:has_last_name"
 },
 "sh:node": {
 "sh:property": {
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:datatype": {
 "@id": "xsd:string"
 },
 "sh:minCount": 1
 }
 },
 "sh:minCount": 1
 }
 ]
 }
}
```

<!--/source-->

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

```
{
 "request_payload": {
 "people": [
 {
 "@id": "01FD6ZKZD7WGZXYFGJBVPVP2Q5",
 "@type": "person",
 "first_name": "john",
 "last_name": "Doe",
 "email": "john.doe"
 }
 ]
 },
 "shapes": {
 "@context": {
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@id": "sc:PersonShape",
 "@type": "sh:NodeShape",
 "sh:targetClass": {
 "@id": "sc:person"
 },
 "sh:property": [
 {
 "sh:path": {
 "@id": "sc:first_name"
 },
 "sh:minCount": 1,
 "sh:datatype": {
 "@id": "xsd:string"
 }
 },
 {
 "sh:path": {
 "@id": "sc:last_name"
 },
 "sh:datatype": {
 "@id": "xsd:string"
 },
 "sh:minCount": 1
 },
 {
 "sh:path": {
 "@id": "sc:email"
 },
 "sh:datatype": {
 "@id": "xsd:string"
 },
 "sh:minCount": 1,
 "sh:pattern": "[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)*(\\.[a-zA-Z]{2,})"
 }
 ]
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "request_payload": {
 "people": [
 {
 "@id": "sc:Bob",
 "@type": "borrower",
 "has_taxpayer_identifier_type": {
 "has_value": "individual_taxpayer_identification_number"
 }
 }
 ]
 },
 "shapes": {
 "@context": {
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "shape": "https://www.staircase.co/florida/shapes/",
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@id": "shape:borrower_shape",
 "@type": "sh:NodeShape",
 "sh:property": [
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "individual_taxpayer_identification_number"
 },
 {
 "@type": "xsd:string",
 "@value": "social_security_number"
 },
 {
 "@type": "xsd:string",
 "@value": "employer_identification_number"
 }
 ]
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_taxpayer_identifier_type"
 }
 }
 ],
 "sh:targetClass": {
 "@id": "sc:borrower"
 }
 }
}
```

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `request_payload` | `object` | <!--source:api-specifications-->The data that you want to validate, provided in JSON-LD format<!--/source--> |
| `shapes` | `object` | <!--source:api-specifications-->SHACL shapes defining the constraints<!--/source--> |
| `@context` | `object` | <!--source:api-specifications-->The JSON-LD context, defining prefixes and base URLs<!--/source--> |
| `@id` | `string` | <!--source:api-specifications-->The identifier for the SHACL shape<!--/source--> |
| `@type` | `string` | <!--source:api-specifications-->The type of the SHACL shape, generally "sh:NodeShape"<!--/source--> |
| `sh:targetClass` | `object` | <!--source:api-specifications-->The target class that this shape applies to<!--/source--> |
| `sh:property` | `object[]` | <!--source:api-specifications-->SHACL shapes defining property<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The validation operation was successful. The response will contain a report of the validation results.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `invocations` | `object[]` | <!--source:api-specifications-->Invocation response<!--/source--> |

##### Other responses

`400``500`

`POST` `/generate/syntactic/{language_name}`

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

#### Syntactic Shapes Generation
<!--/source-->

`generateSyntacticShape`

<!--source:api-specifications-->
Generate Syntactic Shapes
<!--/source-->

<!--source:api-specifications-->
This endpoint receives graph entities as a request body, language name as a path parameter and generates shacl shapes persisting them into graph. Language name parameter only accepts `florida` or `lexicon` values. Generated shapes can then be queried and utilized for further validation.

Example of persisted shape (Lexicon):

```
@prefix owl: .
@prefix rdf: .
@prefix sc: .
@prefix sh: .
@prefix shape: .
@prefix xsd: .

shape:loan_shape a sh:NodeShape ;
 sh:targetClass sc:class2 ;
 shape:type "syntactic" .

shape:person_shape a sh:NodeShape ;
 sh:property [ sh:datatype xsd:string ;
 sh:in [ a rdf:List ;
 rdf:first "val1" ;
 rdf:rest [ a rdf:List ;
 rdf:first "val2" ;
 rdf:rest [ a rdf:List ;
 rdf:first "val3" ;
 rdf:rest ] ] ] ;
 sh:maxInclusive 1e+02 ;
 sh:maxLength 35 ;
 sh:minInclusive 1e+00 ;
 sh:minLength 2 ;
 sh:path sc:prop1 ;
 sh:pattern "[A_Z]" ],
 [ sh:class sc:class2 ;
 sh:path sc:prop2 ] ;
 sh:targetClass sc:class1 ;
 shape:type "syntactic" .

shape:type a owl:AnnotationProperty .
```

Example of persisted shape (Florida):

Show the rest
```
@prefix owl: .
@prefix rdf: .
@prefix sc: .
@prefix sh: .
@prefix shape: .
@prefix xsd: .

shape:loan_shape a sh:NodeShape ;
 sh:targetClass sc:class2 ;
 shape:type "syntactic" .

shape:person_shape a sh:NodeShape ;
 sh:property [ sh:class sc:class2 ;
 sh:path sc:prop2 ],
 [ sh:node [ sh:property [ sh:datatype xsd:string ;
 sh:in [ a rdf:List ;
 rdf:first "val1" ;
 rdf:rest [ a rdf:List ;
 rdf:first "val2" ;
 rdf:rest ] ] ;
 sh:maxInclusive 1e+02 ;
 sh:maxLength 35 ;
 sh:minCount 1 ;
 sh:minInclusive 1e+00 ;
 sh:minLength 2 ;
 sh:path sc:has_value ;
 sh:pattern "[A_Z]" ] ] ;
 sh:path sc:prop1 ] ;
 sh:targetClass sc:class1 ;
 shape:type "syntactic" .

shape:type a owl:AnnotationProperty .
```

<!--/source-->

##### Request

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

```
{
 "graph_entities": [
 {
 "@id": "1",
 "@type": "graph_entity",
 "label": "person",
 "container_name": "people",
 "subClassOf": "class"
 },
 {
 "@id": "2",
 "@type": "graph_entity",
 "label": "loan",
 "container_name": "loans",
 "subClassOf": "class"
 },
 {
 "@id": "3",
 "@type": "graph_entity",
 "label": "has_first_name",
 "subClassOf": "data_property",
 "domain": "person",
 "range": "string",
 "minimum_length": 2,
 "maximum_length": 35,
 "minimum_value": 1,
 "maximum_value": 100,
 "pattern": "[A_Z]",
 "enumeration": [
 "val1",
 "val2",
 "val3"
 ]
 },
 {
 "@id": "4",
 "@type": "graph_entity",
 "label": "with_loan",
 "subClassOf": "object_property",
 "domain": "person",
 "range": "loan"
 }
 ]
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `language_name` required | `string` path | `lexicon` | <!--source:api-specifications-->Language Name, can either be lexicon or florida<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `graph_entities` | `object[]` | <!--source:api-specifications-->List of graph entities with required constrains.<!--/source--> |
| `label` | `string` | <!--source:api-specifications-->Label of a class or a property in Lexicon.<!--/source--> |
| `lexicon_identifier` | `string` | <!--source:api-specifications-->Lexicon Identifier of a class or a property in Lexicon.<!--/source--> |
| `subClassOf` | `string` | <!--source:api-specifications-->Type of a graph entity.<!--/source-->`class``data_property``object_property` |
| `container_name` | `string` | <!--source:api-specifications-->Container name of a class.<!--/source--> |
| `domain` | `string` | <!--source:api-specifications-->Domain of a property, should match lexicon identifier of one of the provided class graph entities.<!--/source--> |
| `range` | `string` | <!--source:api-specifications-->Range of a property, should either be lexicon identifier of a class (in case of object property) or one of the [`string`, `double`, `integer`, `date`, `dateTime`, `dateTimeStamp`, `boolean`] in case of data property.<!--/source--> |
| `minimum_length` | `integer` | <!--source:api-specifications-->Can be utilize to set minimum length constrain on a property.<!--/source--> |
| `maximum_length` | `integer` | <!--source:api-specifications-->Can be utilize to set maximum length constrain on a property.<!--/source--> |
| `minimum_value` | `number` | <!--source:api-specifications-->Can be utilize to set minimum value constrain on a property.<!--/source--> |
| `maximum_value` | `number` | <!--source:api-specifications-->Can be utilize to set maximum value constrain on a property.<!--/source--> |
| `pattern` | `string` | <!--source:api-specifications-->Can be utilize to set regex pattern constrain on a property.<!--/source--> |
| `enumeration` | `string[]` | <!--source:api-specifications-->Can be utilize to set enumeration constrain on a property.<!--/source--> |

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

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
The syntactic shape generation was successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `integer` | <!--source:api-specifications-->Status Code.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Message.<!--/source--> |
| `transaction_id` | `string` | <!--source:api-specifications-->Transaction ID.<!--/source--> |
| `collection_id` | `string` | <!--source:api-specifications-->Collection ID.<!--/source--> |

##### Other responses

`400``500`

`POST` `/query/{language_name}`

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

#### Shapes Query
<!--/source-->

`queryShapes`

<!--source:api-specifications-->
Query Shapes
<!--/source-->

<!--source:api-specifications-->
The Shapes Query endpoint is for retrieving SHACL shapes in json-ld format which can further be inputted into validation endpoint. You can learn more about SHACL shapes from the official SHACL specification.

#### Shapes Classification

Lexicon Level Shapes

- Syntactic shapes: Responsible for defining constraints such as datatype, enumeration, pattern, max/min length, and max/min value.
- Semantic shapes: Responsible for implementing if-else kind of rules, such as conditional requirements for properties (e.g., if property1 exists, then property2 is required).

API Level Shapes

Show the rest
- Semantic shapes: Currently, only semantic shapes are implemented for API level. They present the required/optional field information for properties and containers. To configure API schema information Product API Languages List View should be utilized.

#### Retrieving Shapes

Lexicon level shapes require a list of class `graph_entities` in the request body, indicating list of classes (e.g. person, loan, asset) you are willing to validate, see schema below.

For obtaining API level shapes, the query parameters `product_api_identifier` and `schema_type` (request or response) should be defined. No need to provide any request body.

The optional `shape_type` query parameter can take values 'syntactic' or 'semantic'. It defaults to 'syntactic' when not specified.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy Lexicon level shapes retrieval

```
{
 "graph_entities": [
 {
 "@id": "1",
 "@type": "graph_entity",
 "label": "person",
 "container_name": "people",
 "subClassOf": "class"
 },
 {
 "@id": "2",
 "@type": "graph_entity",
 "label": "loan",
 "container_name": "loans",
 "subClassOf": "class"
 }
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Florida single syntactic shape200 Florida multiple syntactic shapes200 Lexicon syntactic shape200 Florida API level semantic shape
<!--/source-->

<!--source:api-specifications-->
application/json Copy The shape querying was successful.

```
{
 "@context": {
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "shape": "https://www.staircase.co/florida/shapes/",
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@id": "shape:borrower_shape",
 "@type": "sh:NodeShape",
 "sh:property": [
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "individual_taxpayer_identification_number"
 },
 {
 "@type": "xsd:string",
 "@value": "social_security_number"
 },
 {
 "@type": "xsd:string",
 "@value": "employer_identification_number"
 }
 ]
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_taxpayer_identifier_type"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "married"
 },
 {
 "@type": "xsd:string",
 "@value": "separated"
 },
 {
 "@type": "xsd:string",
 "@value": "unmarried"
 }
 ]
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_marital_status_type"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "jointly"
 },
 {
 "@type": "xsd:string",
 "@value": "not_jointly"
 }
 ]
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_joint_asset_liability_reporting_type"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "civil_union"
 },
 {
 "@type": "xsd:string",
 "@value": "domestic_partnership"
 },
 {
 "@type": "xsd:string",
 "@value": "other"
 },
 {
 "@type": "xsd:string",
 "@value": "registered_reciprocal_beneficiary_relationship"
 }
 ]
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_domestic_relationship_type"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_domestic_relationship_type_other_description"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_first_name"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]{2}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_dependent_count"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_credit_report_identifier"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_full_name"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_policy_feature_description"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_domestic_relationship_state_code"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_community_property_state_resident_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_middle_name"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_domestic_relationship_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_self_declared_military_service_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]{3}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_borrower_total_mortgaged_properties_count"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_spousal_va_benefits_eligibility_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_borrower_birth_date"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_suffix_name"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]{9}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_taxpayer_identifier_value"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_last_name"
 }
 }
 ],
 "sh:targetClass": {
 "@id": "sc:borrower"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The shape querying was successful.

```
{
 "@context": {
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "shape": "https://www.staircase.co/florida/shapes/",
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@graph": [
 {
 "@id": "shape:address_shape",
 "@type": "sh:NodeShape",
 "sh:property": [
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "mailing"
 }
 ]
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_address_type"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_address_line_1_text"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_county_name"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_state_code"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_postal_code"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_city_name"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_unit_identifier"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_country_code"
 }
 }
 ],
 "sh:targetClass": {
 "@id": "sc:address"
 }
 },
 {
 "@id": "shape:loan_shape",
 "@type": "sh:NodeShape",
 "sh:property": [
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:in": {
 "@list": [
 {
 "@type": "xsd:string",
 "@value": "related_loan"
 },
 {
 "@type": "xsd:string",
 "@value": "subject_loan"
 }
 ]
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_loan_role_type"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_below_market_subordinate_financing_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_prepayment_penalty_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_buydown_temporary_subsidy_funding_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^\\d{1,9}(\\.\\d{1,2})?$"
 }
 },
 "sh:path": {
 "@id": "sc:has_pace_loan_payoff_amount"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_construction_loan_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#date"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_application_received_date"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_loan_to_value_ltv_ratio_percent"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_lending_limit_amount"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_home_equity_combined_loan_to_value_hcltv_ratio_percent"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_balloon_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#integer"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]\\{2}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_total_mortgaged_properties_count"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#integer"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]\\{3}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_initial_fixed_period_effective_months_count"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_interest_only_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^\\d{1,9}(\\.\\d{1,2})?$"
 }
 },
 "sh:path": {
 "@id": "sc:has_energy_improvement_amount"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_heloc_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_negative_amortization_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_energy_related_improvements_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_loan_affordable_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_conversion_of_contract_for_deed_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_total_subordinate_financing_amount"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_total_subordinate_financing_proceeds_applied_amount"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#boolean"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_renovation_loan_indicator"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#double"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_combined_loan_to_value_cltv_ratio_percent"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#integer"
 },
 "sh:path": {
 "@id": "sc:has_value"
 },
 "sh:pattern": "^[0-9]\\{1}$"
 }
 },
 "sh:path": {
 "@id": "sc:has_borrower_count"
 }
 }
 ],
 "sh:targetClass": {
 "@id": "sc:loan"
 }
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The shape querying was successful.

```
{
 "@context": {
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "shape": "https://www.staircase.co/lexicon/shapes/",
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@id": "shape:person_shape",
 "@type": "sh:NodeShape",
 "sh:property": [
 {
 "sh:datatype": {
 "@id": "http://www.w3.org/2001/XMLSchema#string"
 },
 "sh:maxLength": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "35"
 },
 "sh:minLength": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "2"
 },
 "sh:path": {
 "@id": "sc:first_name"
 }
 },
 {
 "sh:class": {
 "@id": "sc:loan"
 },
 "sh:path": {
 "@id": "sc:has_loan"
 }
 }
 ],
 "sh:targetClass": {
 "@id": "sc:person"
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy The shape querying was successful.

```
{
 "@context": {
 "sh": "http://www.w3.org/ns/shacl#",
 "sc": "https://www.staircase.co/ontology/",
 "shape": "https://www.staircase.co/florida/shapes/",
 "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
 "xsd": "http://www.w3.org/2001/XMLSchema#"
 },
 "@graph": [
 {
 "@id": "shape:person_shape",
 "@type": "sh:NodeShape",
 "sh:property": [
 {
 "sh:node": {
 "sh:property": {
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_first_name"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 }
 },
 {
 "sh:node": {
 "sh:property": {
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 },
 "sh:path": {
 "@id": "sc:has_value"
 }
 }
 },
 "sh:path": {
 "@id": "sc:has_last_name"
 }
 },
 {
 "sh:path": {
 "@id": "sc:with_loan"
 },
 "sh:minCount": {
 "@type": "http://www.w3.org/2001/XMLSchema#integer",
 "@value": "1"
 }
 }
 ],
 "sh:targetClass": {
 "@id": "sc:person"
 }
 },
 {
 "@id": "sc:CollectionShape",
 "@type": "sh:NodeShape",
 "sh:targetNode": {
 "@id": "sc:root"
 },
 "sh:property": [
 {
 "sh:path": {
 "@id": "sc:people"
 },
 "sh:minCount": 1
 }
 ]
 }
 ]
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `language_name` required | `string` path | `lexicon` | <!--source:api-specifications-->Language Name, can either be lexicon or florida<!--/source--> |
| `shape_type` | `string` query | `semantic` | <!--source:api-specifications-->Shape type, either semantic or syntactic.<!--/source--> |
| `product_api_identifier` | `string` query | `f4d96037-ef32-4c21-a90e-5261425d16d` | <!--source:api-specifications-->Staircase product api identifier.<!--/source--> |
| `schema_type` | `string` query | `request` | <!--source:api-specifications-->Shape type, either request or response.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `graph_entities` | `object[]` | <!--source:api-specifications-->List of graph entities with required constrains.<!--/source--> |
| `label` | `string` | <!--source:api-specifications-->Label of a class or a property in Lexicon.<!--/source--> |
| `lexicon_identifier` | `string` | <!--source:api-specifications-->Lexicon Identifier of a class or a property in Lexicon.<!--/source--> |
| `subClassOf` | `string` | <!--source:api-specifications-->Type of a graph entity.<!--/source-->`class` |
| `container_name` | `string` | <!--source:api-specifications-->Container name of a class.<!--/source--> |

##### Other responses

`200``400``500`

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

### Language Utils
<!--/source-->

`POST` `/language-equivalent-generator/execute`

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

#### Entity Equator
<!--/source-->

`entityEquator`

<!--source:api-specifications-->
Entity Equator API can be utilized to generate equivalence class information from the mappings. This API requires the input of a ruleset_name and rules. You can also specify callback_url. The rules need to be defined from/to the staircase-graph/lexicon in order to generate equivalence information. This operation is asynchronous, meaning that once you execute this API, the process of generating equivalences will commence and the results will be visible in the list-view after a certain amount of time.

Show the rest Important note: ruleset_name should one of the following this template:

```
"staircase-graph_CUSTOMER_LANGUAGE_NAME_TRANSLATE"
```

```
"CUSTOMER_LANGUAGE_NAME_staircase-graph_TRANSLATE"
```

```
"lexicon_CUSTOMER_LANGUAGE_NAME_TRANSLATE"
```

```
"CUSTOMER_LANGUAGE_NAME_lexicon_TRANSLATE"
```

Example input:

```
{
 "rules": [
 {
 "id": "2",
 "definition": {
 "from": {
 "path": "foreign_objects"
 },
 "to": {
 "path": "blobs"
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_mime_type_identifier"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_value"
 },
 "to": {
 "path": "mimeTypeIdentifier"
 }
 }
 ]
 },
 {
 "from": {
 "path": "has_object_name"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_value"
 },
 "to": {
 "path": "name"
 }
 }
 ]
 }
 ]
 }
 },
 {
 "id": "3",
 "definition": {
 "from": {
 "path": "messages",
 "evaluate_separate": True
 },
 "to": {
 "path": "messages"
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "with_document_sets",
 "evaluate_separate": True
 },
 "to": {
 "path": "messages"
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "with_document_set"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "with_document"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_document_identifier"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_value"
 },
 "to": {
 "path": "id"
 }
 }
 ]
 }
 ]
 }
 ]
 }
 ]
 }
 ]
 }
 }
 ],
 "ruleset_name": "staircase-graph_CUSTOMER_LANGUAGE_NAME_TRANSLATE"
 }
```

Important note: In order to execute this API automatically with creating/updating rules: please subscribe lexicon-workflow-data bundle in marketplace.

You can review generated equivalences from list-view:

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "ruleset_name": "CUSTOMER_LANGUAGE_NAME_staircase-graph_TRANSLATE",
 "rules": [
 {
 "id": "1",
 "definition": {
 "from": {
 "path": "foreign_objects"
 },
 "to": {
 "path": "blobs"
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_mime_type_identifier"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_value"
 },
 "to": {
 "path": "mimeTypeIdentifier"
 }
 }
 ]
 },
 {
 "from": {
 "path": "has_object_name"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_value"
 },
 "to": {
 "path": "name"
 }
 }
 ]
 }
 ]
 }
 },
 {
 "id": "2",
 "definition": {
 "from": {
 "path": "messages",
 "evaluate_separate": true
 },
 "to": {
 "path": "messages"
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "with_document_sets",
 "evaluate_separate": true
 },
 "to": {
 "path": "messages"
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "with_document_set"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "with_document"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_document_identifier"
 },
 "to": {
 "path": ""
 },
 "attribute_mappings": [
 {
 "from": {
 "path": "has_value"
 },
 "to": {
 "path": "id"
 }
 }
 ]
 }
 ]
 }
 ]
 }
 ]
 }
 ]
 }
 }
 ]
}
```

<!--/source-->

##### Response

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

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

```
{
 "code": 400,
 "message": "Bad Request"
}
```

<!--/source-->

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

```
{
 "code": 422,
 "message": "Unprocessed Entity."
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `ruleset_name` | `string` | <!--source:api-specifications-->Ruleset name for the rules<!--/source--> |
| `rules` | `object[]` | <!--source:api-specifications-->Rule array<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully switched input source
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `number` | <!--source:api-specifications-->Status code<!--/source--> |
| `message` | `object` | <!--source:api-specifications-->Message<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

`POST` `/entity-translation/execute`

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

#### Entity Translation
<!--/source-->

`entityTranslation`

<!--source:api-specifications-->
This API can translate graph entities by providing equivalent information between the input language and output language.

Entity Translation API requires the input_language and output_language parameters to be provided as query parameters, and the translated data object should be included in the request body.

Example input:

```
{
 "graph_entities": [
 {
 "@id": "g_e_1",
 "@type": "graph_entity",
 "has_comment": {
 "has_value": "string"
 },
 "has_container_name": {
 "has_value": "string"
 },
 "has_data_path": {
 "has_value": "string"
 },
 "has_deprecation_indicator": {
 "has_value": "boolean"
 },
 "has_domain": {
 "has_value": "string"
 },
 "has_graph_entity_type": {
 "has_value": "enum - class, data_property, object_property"
 },
 "has_label": {
 "has_value": "string"
 },
 "has_language": {
 "has_value": "string"
 },
 "has_lexicon_identifier": {
 "has_value": "string"
 },
 "has_range": {
 "has_value": "string"
 }
 }
 ]
}
```

The API performs entity translation based on the equivalent information for properties in the languages.

Show the rest

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "graph_entities": [
 {
 "@id": "g_e_1",
 "@type": "graph_entity",
 "has_comment": {
 "has_value": "string"
 },
 "has_container_name": {
 "has_value": "string"
 },
 "has_data_path": {
 "has_value": "string"
 },
 "has_deprecation_indicator": {
 "has_value": true
 },
 "has_domain": {
 "has_value": "string"
 },
 "has_graph_entity_type": {
 "has_value": "class"
 },
 "has_label": {
 "has_value": "string"
 },
 "has_language": {
 "has_value": "string"
 },
 "has_lexicon_identifier": {
 "has_value": "string"
 },
 "has_range": {
 "has_value": "string"
 }
 }
 ]
}
```

<!--/source-->

##### Response

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

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

```
{
 "code": 400,
 "message": "Bad Request"
}
```

<!--/source-->

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

```
{
 "code": 422,
 "message": "Unprocessed Entity."
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `input_language` required | `string` query | `input_language` | <!--source:api-specifications-->The input language for the translation. It can be 'staircase-graph' or a customer-specific language.<!--/source--> |
| `output_language` required | `string` query | `output_language` | <!--source:api-specifications-->The output language for the translation. It can be 'staircase-graph' or a customer-specific language.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `graph_entities` | `object[]` | <!--source:api-specifications-->Graph entities that is going to be translated<!--/source--> |
| `@id` | `string` | <!--source:api-specifications-->The unique identifier for the graph entity<!--/source--> |
| `@type` | `string` | <!--source:api-specifications-->The type of the graph entity<!--/source--> |
| `has_comment` | `object` | <!--source:api-specifications-->Property for "has_comment"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the comment for the entity<!--/source--> |
| `has_container_name` | `object` | <!--source:api-specifications-->Property for "has_container_name"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the container name for the entity<!--/source--> |
| `has_data_path` | `object` | <!--source:api-specifications-->Property for "has_data_path"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the data path for the entity<!--/source--> |
| `has_deprecation_indicator` | `object` | <!--source:api-specifications-->Property for "has_deprecation_indicator"<!--/source--> |
| `has_value` | `boolean` | <!--source:api-specifications-->The value of the deprecation indicator for the entity<!--/source--> |
| `has_domain` | `object` | <!--source:api-specifications-->Property for "has_domain"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the domain for the entity<!--/source--> |
| `has_graph_entity_type` | `object` | <!--source:api-specifications-->Property for "has_graph_entity_type"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the graph entity type for the entity<!--/source--> |
| `has_label` | `object` | <!--source:api-specifications-->Property for "has_label"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the label for the entity<!--/source--> |
| `has_language` | `object` | <!--source:api-specifications-->Property for "has_language"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the language for the entity<!--/source--> |
| `has_lexicon_identifier` | `object` | <!--source:api-specifications-->Property for "has_lexicon_identifier"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the lexicon identifier for the entity<!--/source--> |
| `has_range` | `object` | <!--source:api-specifications-->Property for "has_range"<!--/source--> |
| `has_value` | `string` | <!--source:api-specifications-->The value of the range for the entity<!--/source--> |

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

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Successfully translated entity
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `code` | `number` | <!--source:api-specifications-->Status code<!--/source--> |
| `message` | `object` | <!--source:api-specifications-->Message<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `code`required | `string` | <!--source:api-specifications-->Error name.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Error description.<!--/source--> |

`POST` `/graph-registration/{language_name}`

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

#### Register Language
<!--/source-->

`registerLanguage`

<!--source:api-specifications-->
Language Registration
<!--/source-->

<!--source:api-specifications-->
The Register Language API allows you to register a customer's language in Persistence Graph. To register a language, you need to provide a JSON-Schema and the name of the language as input. Please note that this operation is asynchronous.

After registering the language, you can view the resulting schema in the entity viewer of your environment by appending the language name as the first path parameter. For example, to view the schema for a language named "test_language," you would use the URL:

Show the rest The Entity Viewer incorporates a caching mechanism with a refresh rate of 30 minutes. This means that once you have viewed the language schema, any changes made to the JSON-Schema will be reflected in the viewer after a 30-minute interval.

In order to get status of your language registration you can either check returned transaction and collection ids or add `callback_url` parameter to request body.

In order to use this API please subscribe to "Language Graph Registration" component in your environment.

Important note: In order to execute this API automatically with creating languages: please subscribe lexicon-workflow-data bundle in marketplace.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "json_schema": {
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "title": "Person",
 "type": "object",
 "properties": {
 "firstName": {
 "type": "string",
 "description": "The person's first name."
 },
 "lastName": {
 "type": "string",
 "description": "The person's last name."
 },
 "age": {
 "description": "Age in years which must be equal to or greater than zero.",
 "type": "integer"
 }
 }
 }
}
```

<!--/source-->

##### Response

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

<!--source:api-specifications-->
application/json Copy Successfully switched input source

```
{
 "message": "Registration process started!",
 "transaction_id": "01FJCADX5QEXEDVRWNXAK206MA",
 "collection_id": "01EZQ32PJQGKRA6HR8D72Q9FFF"
}
```

<!--/source-->

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

```
{
 "message": "Provided JSON Schema is invalid or missing!"
}
```

<!--/source-->

##### Parameters

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

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API Key.<!--/source--> |
| `language_name` required | `string` path | `test_language` | <!--source:api-specifications-->Language Name<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `callback_url` | `string` | <!--source:api-specifications-->Callback url.<!--/source--> |
| `json_schema`required | `object` | <!--source:api-specifications-->JSON-Schema of a language.<!--/source--> |

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

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Successfully switched input source
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `object` | <!--source:api-specifications-->Message.<!--/source--> |
| `transaction_id` | `object` | <!--source:api-specifications-->Transaction ID.<!--/source--> |
| `collection_id` | `object` | <!--source:api-specifications-->Collection ID.<!--/source--> |

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

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

| Field | Type | Description |
| --- | --- | --- |
| `error` | `object` | <!--source:api-specifications-->Unprocessed entity error.<!--/source--> |
| `message`required | `object` | <!--source:api-specifications-->Message.<!--/source--> |
| `transaction_id` | `object` | <!--source:api-specifications-->Transaction ID.<!--/source--> |
| `collection_id` | `object` | <!--source:api-specifications-->Collection ID.<!--/source--> |

`POST` `/invocation-extension`

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

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

`extendInvocation`

<!--source:api-specifications-->
This endpoint receives list of invocations with invocation codes and extends each with invocation category and invocation message. One can also provide message parameters that will be replacing placeholders in the invocation message if any are present. Invocation codes, categories and messages are configured through the list view. In order to use this feature please subscribe to `Lexicon Invocation Extension` component in the Marketplace.

<!--/source-->

##### Request

<!--source:api-specifications-->
Florida ExampleLexicon Example
<!--/source-->

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

```
{
 "invocations": [
 {
 "has_invocation_code_type": {
 "has_value": "40002"
 },
 "has_message_parameters": {
 "has_value": [
 "has_first_name",
 "person"
 ]
 }
 },
 {
 "has_invocation_code_type": {
 "has_value": "2000"
 }
 }
 ]
}
```

<!--/source-->

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

```
{
 "invocations": [
 {
 "invocation_code": "40002",
 "message_parameters": [
 "first_name",
 "person"
 ]
 },
 {
 "invocation_code": "2000"
 }
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200 Florida response example200 Lexicon response example
<!--/source-->

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

```
{
 "invocations": [
 {
 "has_invocation_code_type": {
 "has_value": "40002"
 },
 "has_message_parameters": {
 "has_value": [
 "has_first_name",
 "person"
 ]
 },
 "has_invocation_category_type": {
 "has_value": "CARDINALITY_ERROR"
 },
 "has_invocation_message": {
 "has_value": "Cardinality Error: Less than the required number of values found fo",
 "the property has_first_name on the specified class at person. Ensure the correct cardinality according to the constraints'": null
 }
 },
 {
 "has_invocation_code_type": {
 "has_value": "2000"
 },
 "has_invocation_category_type": {
 "has_value": "OK"
 },
 "has_invocation_message": {
 "has_value": "Invocation is successful"
 }
 }
 ]
}
```

<!--/source-->

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

```
{
 "invocations": [
 {
 "invocation_code": "40002",
 "message_parameters": [
 "first_name",
 "person"
 ],
 "invocation_category_type": "CARDINALITY_ERROR",
 "invocation_message": "Cardinality Error: Less than the required number of value",
 "found for the property first_name on the specified class at person. Ensure the correct cardinality according to the constraints'": null
 },
 {
 "invocation_code": "2000",
 "invocation_category_type": "OK",
 "invocation_message": "Invocation is successful"
 }
 ]
}
```

<!--/source-->

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

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

| Field | Type | Description |
| --- | --- | --- |
| `invocations` | `array` | <!--source:api-specifications-->List of Invocations<!--/source--> |

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

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
The operation was successful.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `invocations` | `array` | <!--source:api-specifications-->Extended invocation response<!--/source--> |

##### Other responses

`400``500`

## Canonical model

- `document`

## Errors

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

## More in Contract

- Previous product: Insurance
- Next product: Notary
