{
  "openapi": "3.0.1",
  "info": {
    "title": "eNote Inventory",
    "version": "v1.1"
  },
  "tags": [
    {
      "name": "eNote Inventory"
    }
  ],
  "paths": {
    "/documents": {
      "get": {
        "summary": "Search for eNotes within the eVault",
        "tags": [
          "eNote Inventory"
        ],
        "description": "Use this endpoint to search for eNotes within the eVault. Results are paginated\n(25 per page unless `per_page` is given) and sorted by `sort` (newest first by default).\nAll filters are optional and combine with AND.\n\nCustom fields configured on the eVault can also be filtered and sorted on with a\n`custom_field_<id>` query parameter, where `<id>` is the custom field's UUID with the dashes\nremoved (for example `custom_field_69a157f447d54b6a9ccaa3778b524ec1=value`). Filtering is a\ncase-insensitive partial match on the field's value.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve; values below 1 are treated as 1",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "example": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "How many results to return per page; values outside 1–200 are clamped",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 25,
              "example": 25
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Comma-separated list of sort columns, each optionally prefixed with `-` (descending) or `+` (ascending, the default when there is no prefix). A literal `+` in a query string is read as a space, so URL-encode it as `%2B` or omit it. Accepted columns: `created_at`, `updated_at`, `loan_number`, `min_number`, `status`, `registered_at`, `deactivated_at`, `borrower_names` (sorts by the primary borrower's display name), `deactivation_reason`, and `custom_field_<id>`. Other values are not supported. Defaults to `-created_at`.",
            "schema": {
              "type": "string",
              "default": "-created_at",
              "example": "-created_at,loan_number"
            }
          },
          {
            "name": "min",
            "in": "query",
            "required": false,
            "description": "MIN numbers to search on, separated by commas or whitespace. Each term is a partial match against the MIN; `*` is a wildcard and any non-digit characters are ignored.",
            "schema": {
              "type": "string",
              "example": "999938091211784532,999938096356189561"
            }
          },
          {
            "name": "loan_number",
            "in": "query",
            "required": false,
            "description": "Loan numbers to search on, separated by commas or whitespace. Each term is a case-sensitive partial match; `*` is a wildcard.",
            "schema": {
              "type": "string",
              "example": "LN-1234,LN-5678"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Free-text search, comma-separated. Every term is matched (case-insensitive, partial) against the loan number; all-numeric terms are also matched against the MIN; terms containing no digits are also matched against the primary borrower's name. `*` is a wildcard. `query` is accepted as an alias.",
            "schema": {
              "type": "string",
              "example": "Green"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Restrict to documents created within a recent window: `-<n>` followed by `day`, `week`, `month` or `year` (`-30day`, `-2week`, `-1year`; the unit defaults to days).",
            "schema": {
              "type": "string",
              "example": "-30day"
            }
          },
          {
            "name": "created_at_start_date",
            "in": "query",
            "required": false,
            "description": "Restrict to documents created on or after this date or ISO 8601 timestamp",
            "schema": {
              "type": "string",
              "example": "2023-06-01"
            }
          },
          {
            "name": "created_at_end_date",
            "in": "query",
            "required": false,
            "description": "Restrict to documents created on or before this date or ISO 8601 timestamp",
            "schema": {
              "type": "string",
              "example": "2023-06-30T23:59:59Z"
            }
          },
          {
            "name": "status_types",
            "in": "query",
            "required": false,
            "description": "Comma-separated document statuses to include: initiated, sealed, edelivered, active, inactive, canceled",
            "schema": {
              "type": "string",
              "example": "active,inactive"
            }
          },
          {
            "name": "deactivation_reason_types",
            "in": "query",
            "required": false,
            "description": "Comma-separated deactivation reasons to include (case-insensitive), matched against `deactivation_reason`",
            "schema": {
              "type": "string",
              "example": "PaidOff,ChargedOff"
            }
          },
          {
            "name": "auto_val_status_types",
            "in": "query",
            "required": false,
            "description": "Comma-separated auto-validation statuses to include: passed, failed, cleared, or not_checked for documents that have not been validated",
            "schema": {
              "type": "string",
              "example": "failed,not_checked"
            }
          },
          {
            "name": "authoritative_copy_types",
            "in": "query",
            "required": false,
            "description": "`true` to return only authoritative copies, `false` to exclude them",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "true"
            }
          },
          {
            "name": "originated_in_vault_types",
            "in": "query",
            "required": false,
            "description": "`true` to return only notes originated in this eVault, `false` for only edelivered notes",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "true"
            }
          },
          {
            "name": "has_power_of_attorney_types",
            "in": "query",
            "required": false,
            "description": "`true` to return only notes signed under a power of attorney, `false` to exclude them",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "false"
            }
          },
          {
            "name": "loan_modification_indicator_types",
            "in": "query",
            "required": false,
            "description": "`true` to return only modified loans, `false` to exclude them",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "false"
            }
          },
          {
            "name": "is_arm_types",
            "in": "query",
            "required": false,
            "description": "`true` to return only adjustable-rate notes, `false` to exclude them",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "false"
            }
          },
          {
            "name": "controller_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `controller` is one of them. Pass an empty value to return documents with no `controller`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_controller_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `controller` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          },
          {
            "name": "location_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `location` is one of them. Pass an empty value to return documents with no `location`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_location_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `location` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          },
          {
            "name": "master_servicer_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `master_servicer` is one of them. Pass an empty value to return documents with no `master_servicer`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_master_servicer_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `master_servicer` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          },
          {
            "name": "subservicer_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `subservicer` is one of them. Pass an empty value to return documents with no `subservicer`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_subservicer_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `subservicer` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          },
          {
            "name": "delegatee_for_transfers_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `delegatee_for_transfers` is one of them. Pass an empty value to return documents with no `delegatee_for_transfers`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_delegatee_for_transfers_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `delegatee_for_transfers` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          },
          {
            "name": "secured_party_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `secured_party` is one of them. Pass an empty value to return documents with no `secured_party`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_secured_party_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `secured_party` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          },
          {
            "name": "secured_party_delegatee_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose current `secured_party_delegatee` is one of them. Pass an empty value to return documents with no `secured_party_delegatee`.",
            "schema": {
              "type": "string",
              "example": "1000001,1000002"
            }
          },
          {
            "name": "previous_secured_party_delegatee_orgs",
            "in": "query",
            "required": false,
            "description": "Comma-separated MERS org ids; returns documents whose `secured_party_delegatee` before the last transfer was one of them",
            "schema": {
              "type": "string",
              "example": "1000001"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/document"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/paginated_index_links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/paginated_index_meta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: the token does not carry the documents:read or documents:basic scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forbidden_error"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{document_id}": {
      "get": {
        "summary": "Retrieve information about an eNote",
        "tags": [
          "eNote Inventory"
        ],
        "description": "Use this endpoint to retrieve information about an eNote",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
              "description": "the unique identifier for the document"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/document"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: the token does not carry the documents:read or documents:basic scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forbidden_error"
                }
              }
            }
          },
          "404": {
            "description": "not found: no document with this id in the eVault"
          }
        }
      }
    },
    "/documents/{min}/xml_data": {
      "get": {
        "summary": "Retrieve note information using the MIN number",
        "tags": [
          "eNote Inventory"
        ],
        "description": "Use this endpoint to retrieve note information using the MIN number.\nThis automatically selects the current version (emortgage package) of the eNote,\nto retrieve information related to a specific emortgage package use the \n/emortgage_packages/{emortgage_package_id}/xml_data endpoint\n",
        "parameters": [
          {
            "name": "min",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "999938091211784532",
              "description": "the MIN number of the eNote (exact match)"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "xml_data": {
                      "$ref": "#/components/schemas/xml_data"
                    },
                    "document_id": {
                      "type": "string",
                      "example": "e4bac3b7-4133-4b3f-a41e-75c65a14bb95",
                      "description": "document id of the eNote"
                    },
                    "emortgage_package_id": {
                      "type": "string",
                      "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
                      "description": "emortgage package id of the eNote"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad request: the current version has no note file to read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/xml_data_errors"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: the token does not carry the documents:read or documents:basic scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forbidden_error"
                }
              }
            }
          },
          "404": {
            "description": "not found: no document with this MIN in the eVault"
          }
        }
      }
    },
    "/emortgage_packages/{emortgage_package_id}/signed_preview": {
      "get": {
        "summary": "Retrieve a PDF preview copy of the signed note version",
        "tags": [
          "eNote Inventory"
        ],
        "description": "Use this endpoint to retrieve a PDF preview copy of the signed note version",
        "parameters": [
          {
            "name": "emortgage_package_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
              "description": "the unique identifier for the emortgage package to preview"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK: the PDF preview",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "bad request: the version is not signed and sealed, or its seal is still pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/signed_preview_error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: the token does not carry the documents:read or documents:basic scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forbidden_error"
                }
              }
            }
          },
          "404": {
            "description": "not found: no emortgage package with this id in the eVault"
          }
        }
      }
    },
    "/emortgage_packages/{emortgage_package_id}": {
      "get": {
        "summary": "Retrieve information about an eMortgage Package",
        "tags": [
          "eNote Inventory"
        ],
        "description": "Use this endpoint to retrieve information about an eMortgage Package",
        "parameters": [
          {
            "name": "emortgage_package_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
              "description": "the unique identifier for the emortgage package to view"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/emortgage_package"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: the token does not carry the documents:read or documents:basic scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forbidden_error"
                }
              }
            }
          },
          "404": {
            "description": "not found: no emortgage package with this id in the eVault"
          }
        }
      }
    },
    "/emortgage_packages/{emortgage_package_id}/xml_data": {
      "get": {
        "summary": "Retrieve note information from an eMortgage Package",
        "tags": [
          "eNote Inventory"
        ],
        "description": "Use this endpoint to retrieve note XML information from an eMortgage Package",
        "parameters": [
          {
            "name": "emortgage_package_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
              "description": "the unique identifier for the emortgage package to view"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "xml_data": {
                      "$ref": "#/components/schemas/xml_data"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad request: the package has no note file to read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/xml_data_errors"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: the token does not carry the documents:read or documents:basic scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forbidden_error"
                }
              }
            }
          },
          "404": {
            "description": "not found: no emortgage package with this id in the eVault"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://demo.snapdocsevault.com/api",
      "description": "Snapdocs Evault demo environment"
    },
    {
      "url": "https://www.snapdocsevault.com/api",
      "description": "Snapdocs Evault production environment"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "borrower": {
        "type": "object",
        "properties": {
          "id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "integer"
              }
            ],
            "description": "id of the Borrower object. When the document has no borrower records but borrower names were extracted from the note XML, the borrowers are built from those names instead and `id` is the 0-based position of the name; only `id` and `full_name` are present in that case.",
            "example": "69a157f4-47d5-4b6a-9cca-a3778b524ec1"
          },
          "person": {
            "type": "boolean",
            "description": "true when the borrower is a person, false when it is an entity",
            "example": true
          },
          "name": {
            "type": "object",
            "nullable": true,
            "description": "Structured name. For a person: `first_name`, `middle_name`, `last_name` and `name_suffix`. For an entity: `name` only. `null` when no name is recorded.",
            "properties": {
              "first_name": {
                "type": "string",
                "nullable": true,
                "example": "David"
              },
              "middle_name": {
                "type": "string",
                "nullable": true,
                "example": "F."
              },
              "last_name": {
                "type": "string",
                "nullable": true,
                "example": "Green"
              },
              "name_suffix": {
                "type": "string",
                "nullable": true,
                "example": "Jr"
              },
              "name": {
                "type": "string",
                "description": "entity name (entities only)",
                "example": "Green Holdings LLC"
              }
            }
          },
          "order": {
            "type": "integer",
            "description": "Borrower order number",
            "example": 1
          },
          "full_name": {
            "type": "string",
            "nullable": true,
            "description": "Full name of the borrower",
            "example": "David F. Green Jr"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the borrower signed the note",
            "example": "2023-07-25T20:06:17.931Z"
          }
        }
      },
      "document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
            "description": "The document id"
          },
          "type": {
            "type": "string",
            "example": "documents",
            "description": "The type of object"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "evault_id": {
                "type": "string",
                "format": "uuid",
                "example": "e726f0ee-7c5b-441c-804c-0e91e9ab404a",
                "description": "id of the evault object"
              },
              "primary_package_id": {
                "type": "string",
                "format": "uuid",
                "example": "e4bac3b7-4133-4b3f-a41e-75c65a14bb95",
                "description": "id of the active version of the document"
              },
              "min_number": {
                "type": "string",
                "example": "999938091211784532",
                "description": "MERS min number associated with the relevant enote"
              },
              "loan_number": {
                "type": "string",
                "description": "the identifier assigned by the originating lender to be referenced as the loan ID/Number on all settlement documents, notes, riders, etc…"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the document was created in the eVault"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the document record was last updated"
              },
              "tamper_sealed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the tamper seal for the note was applied"
              },
              "registered_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the note was registered with MERS"
              },
              "last_inquiry_date": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the note was last updated with data from MERS"
              },
              "stored": {
                "type": "boolean",
                "example": true,
                "description": "Whether the signed note file has been stored in the eVault"
              },
              "stored_and_sealed": {
                "type": "boolean",
                "example": true,
                "description": "Whether the note has been signed and tamper sealed"
              },
              "borrower_names": {
                "type": "array",
                "items": {
                  "type": "string",
                  "nullable": true
                },
                "example": [
                  "Green"
                ],
                "description": "One display name per borrower: the last name for a person, the entity name for an entity"
              },
              "primary_borrower_name": {
                "type": "string",
                "nullable": true,
                "example": "Green",
                "description": "The primary borrower's display name: the last name for a person, the entity name for an entity"
              },
              "transferrable": {
                "type": "boolean",
                "description": "Whether the note is available to be transferred"
              },
              "authoritative_copy": {
                "type": "boolean",
                "description": "Whether the note is the authoritative copy"
              },
              "has_power_of_attorney": {
                "type": "boolean",
                "example": false,
                "description": "Whether any borrower on the current version signed under a power of attorney"
              },
              "is_arm": {
                "type": "boolean",
                "example": false,
                "description": "Whether the note is an adjustable-rate note"
              },
              "inquiry_signature_validation": {
                "type": "boolean",
                "nullable": true,
                "example": null,
                "description": "Result of the signature validation reported by the last MERS inquiry; null until an inquiry has reported one"
              },
              "loan_modification_indicator": {
                "type": "boolean",
                "description": "Whether the loan has been modified"
              },
              "loan_modification_type": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "Paper",
                  "Electronic",
                  null
                ],
                "description": "If modified, what type of modification was performed"
              },
              "assumption_indicator": {
                "type": "boolean",
                "description": "Whether the loan has been assumed"
              },
              "source": {
                "type": "string",
                "example": "originated",
                "description": "whether the document was originated in the system or edelivered",
                "enum": [
                  "originated",
                  "edelivered"
                ]
              },
              "status": {
                "type": "string",
                "example": "active",
                "description": "lifecycle status of this document",
                "enum": [
                  "initiated",
                  "sealed",
                  "edelivered",
                  "active",
                  "inactive",
                  "canceled"
                ]
              },
              "status_description": {
                "type": "string",
                "nullable": true,
                "example": "Registration Reversal",
                "description": "human-readable form of `deactivation_reason`; null when the document is not inactive"
              },
              "auto_val_status": {
                "type": "string",
                "nullable": true,
                "example": "passed",
                "description": "the auto-validations status of this document; null when auto-validation has not run",
                "enum": [
                  "passed",
                  "failed",
                  "cleared",
                  null
                ]
              },
              "deactivation_reason": {
                "type": "string",
                "nullable": true,
                "example": "RegistrationReversal",
                "description": "if this document is inactive, the MERS inactive status type (for example RegistrationReversal, PaidOff, ChargedOff, TransferredToProprietaryRegistry, ConvertedToPaper), or the free-text description when MERS reports the type as Other"
              },
              "deactivated_at": {
                "type": "string",
                "format": "date",
                "nullable": true,
                "example": "2025-07-30",
                "description": "if this document is inactive, the date of deactivation (date only, no time component)"
              },
              "locked_by": {
                "type": "object",
                "nullable": true,
                "description": "the certified paper copy or convert-to-paper process currently locking the document; null when the document is not locked",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "c46c0412-09c7-4161-a4b0-e98c022dcae2"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "CertifiedPaperCopyProcess",
                      "ConvertToPaperProcess"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "example": "in_progress"
                  },
                  "unlock_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "boolean"
                      }
                    ],
                    "nullable": true,
                    "description": "when the lock expires; `false` when the lock is not currently active"
                  },
                  "user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "the user who started the process"
                  }
                }
              },
              "borrowers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/borrower"
                }
              },
              "document_sections": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/document_section"
                }
              },
              "rights_holders": {
                "description": "current MERS rights holders by role. Roles with no holder are returned as null; on eVaults where the complete-rights-holders rollout is not yet enabled, roles with no holder are omitted instead.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/rights_holders"
                  }
                ]
              },
              "previous_right_holders": {
                "description": "rights holders before the most recent transfer, by role. Roles with no previous holder are returned as null; on eVaults where the complete-rights-holders rollout is not yet enabled, they are omitted instead.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/rights_holders"
                  }
                ]
              },
              "custom_data": {
                "type": "object",
                "example": {
                  "CustomField": "value"
                },
                "description": "optional set of custom data fields saved on the document, keyed by custom field name"
              }
            }
          },
          "relationships": {
            "type": "object",
            "properties": {
              "property_address": {
                "type": "object",
                "description": "JSON:API relationship pointer to the property address of the current version; `data` is null when no address is recorded",
                "properties": {
                  "data": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "6d474b0f-6950-4455-be99-b4771009bfc8"
                      },
                      "type": {
                        "type": "string",
                        "example": "property_addresses"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "document_section": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "id of the Document Section object",
            "example": "c46c0412-09c7-4161-a4b0-e98c022dcae2"
          },
          "file_name": {
            "type": "string",
            "description": "name of the file associated with the section",
            "example": "note.xml"
          },
          "file_type": {
            "type": "string",
            "description": "type of the file",
            "example": "xml"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "when the section was created",
            "example": "2023-07-25T20:06:17.903Z"
          },
          "document_type": {
            "type": "string",
            "description": "type of the section",
            "example": "Note"
          },
          "display_document_type": {
            "type": "string",
            "description": "display label for the section: `HELOC` for a HELOC note, otherwise the same as `document_type`",
            "example": "Note"
          }
        }
      },
      "right_holder": {
        "type": "object",
        "properties": {
          "mers_org": {
            "type": "string",
            "description": "MERS identifier for the right holder",
            "example": "0000001"
          },
          "name": {
            "type": "string",
            "description": "name of the right holder",
            "example": "Example Organization"
          }
        }
      },
      "rights_holders": {
        "type": "object",
        "properties": {
          "controller": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          },
          "location": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          },
          "master_servicer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          },
          "subservicer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          },
          "delegatee_for_transfers": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          },
          "secured_party": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          },
          "secured_party_delegatee": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/right_holder"
              }
            ]
          }
        }
      },
      "emortgage_package": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
            "description": "The emortgage package id"
          },
          "type": {
            "type": "string",
            "example": "emortgage_packages",
            "description": "The type of object"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "evault_id": {
                "type": "string",
                "format": "uuid",
                "example": "e726f0ee-7c5b-441c-804c-0e91e9ab404a",
                "description": "id of the evault object"
              },
              "document_id": {
                "type": "string",
                "format": "uuid",
                "example": "e4bac3b7-4133-4b3f-a41e-75c65a14bb95",
                "description": "id of the document the package belongs to"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the emortgage package was created"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the emortgage package was last updated"
              },
              "tamper_sealed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "example": "2023-07-25T20:06:17.903Z",
                "description": "When the tamper seal for the note was applied"
              },
              "stored": {
                "type": "boolean",
                "example": true,
                "description": "Whether the signed note file has been stored in the eVault"
              },
              "stored_and_sealed": {
                "type": "boolean",
                "example": true,
                "description": "Whether the note has been signed and tamper sealed"
              },
              "primary": {
                "type": "boolean",
                "example": true,
                "description": "Whether the emortgage package is the primary version for the document"
              },
              "borrower_names": {
                "type": "array",
                "items": {
                  "type": "string",
                  "nullable": true
                },
                "example": [
                  "Green"
                ],
                "description": "One display name per borrower: the last name for a person, the entity name for an entity"
              },
              "primary_borrower_name": {
                "type": "string",
                "nullable": true,
                "example": "Green",
                "description": "The primary borrower's display name: the last name for a person, the entity name for an entity"
              },
              "status": {
                "type": "string",
                "example": "sealed",
                "description": "lifecycle status of this emortgage package",
                "enum": [
                  "initiated",
                  "pending_seal",
                  "sealed",
                  "edelivered",
                  "canceled"
                ]
              },
              "auto_val_status": {
                "type": "string",
                "nullable": true,
                "example": "passed",
                "description": "the auto-validations status of this emortgage package; null when auto-validation has not run",
                "enum": [
                  "passed",
                  "failed",
                  "cleared",
                  null
                ]
              },
              "borrowers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/borrower"
                }
              },
              "document_sections": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/document_section"
                }
              },
              "property_address": {
                "type": "object",
                "description": "the property address recorded for this version; an empty object when none is recorded",
                "properties": {
                  "unit": {
                    "type": "string",
                    "nullable": true,
                    "example": null
                  },
                  "direction_prefix": {
                    "type": "string",
                    "nullable": true,
                    "example": null
                  },
                  "direction_suffix": {
                    "type": "string",
                    "nullable": true,
                    "example": null
                  },
                  "house_number": {
                    "type": "string",
                    "nullable": true,
                    "example": "100"
                  },
                  "street_name": {
                    "type": "string",
                    "nullable": true,
                    "example": "Montgomery"
                  },
                  "street_suffix": {
                    "type": "string",
                    "nullable": true,
                    "example": "Street"
                  },
                  "city": {
                    "type": "string",
                    "nullable": true,
                    "example": "San Francisco"
                  },
                  "county": {
                    "type": "string",
                    "nullable": true,
                    "example": "San Francisco"
                  },
                  "state": {
                    "type": "string",
                    "nullable": true,
                    "example": "CA"
                  },
                  "country": {
                    "type": "string",
                    "nullable": true,
                    "example": "USA"
                  },
                  "postcode": {
                    "type": "string",
                    "nullable": true,
                    "example": "94104"
                  },
                  "original_street_address": {
                    "type": "string",
                    "nullable": true,
                    "example": "100 Montgomery Street"
                  }
                }
              }
            }
          }
        }
      },
      "xml_data": {
        "type": "object",
        "properties": {
          "late_charge_grace_period": {
            "type": "string",
            "description": "The grace period in days for this loan before a late charge will be applied",
            "example": "11",
            "nullable": true
          },
          "late_charge_rate": {
            "type": "string",
            "example": "4.321",
            "description": "The percentage that a borrower is required to pay for failure to make a regular installment within the period specified on the note. This is the amount specified by the late charge code and is used when the late charge is not a flat dollar.",
            "nullable": true
          },
          "scheduled_first_payment_date": {
            "type": "string",
            "example": "2019-04-01",
            "description": "The date of the first scheduled mortgage payment to be made by the borrower under the terms of the mortgage.",
            "nullable": true
          },
          "late_charge_minimum_amount": {
            "type": "string",
            "description": "The minimum monthly late charge amount allowed.",
            "example": "10",
            "nullable": true
          },
          "late_charge_maximum_amount": {
            "type": "string",
            "description": "The maximum monthly late charge amount allowed.",
            "example": "20",
            "nullable": true
          },
          "note_rate_percent": {
            "type": "string",
            "description": "The actual interest rate as disclosed on the note.",
            "example": "4.000",
            "nullable": true
          },
          "arm_lifetime_floor_percent": {
            "type": "string",
            "example": "2.250",
            "description": "The minimum interest rate to which the interest rate can decrease to over the life of the loan.",
            "nullable": true
          },
          "rate_adjustment_subsequent_cap_percent": {
            "type": "string",
            "example": "1.000",
            "description": "The maximum percentage (cap) of the rate increase allowed at each rate adjustment period after the initial adjustment within the allowed duration, if the interest rate on the subject loan can change.",
            "nullable": true
          },
          "subsequent_rate_adjustment_months": {
            "type": "string",
            "example": "6",
            "description": "The number of months between the subsequent rate adjustments, if the interest rate on the subject loan can change.",
            "nullable": true
          },
          "first_rate_adjustment_date": {
            "type": "string",
            "example": "2029-04-01",
            "description": "The first date the interest rate will adjust in an ARM transaction",
            "nullable": true
          },
          "rate_adjustment_first_change_floor_rate": {
            "type": "string",
            "example": "2.250",
            "description": "The minimum interest rate that can be applied at the first interest rate adjustment.",
            "nullable": true
          },
          "rate_adjustment_first_change_cap_rate": {
            "type": "string",
            "example": "9.000",
            "description": "The maximum interest rate that can be applied at the first interest rate adjustment",
            "nullable": true
          },
          "arm_index_margin_percent": {
            "type": "string",
            "example": "2.250",
            "description": "The percentage stated in the loan program representing the spread between the ARM Index value and the mortgage interest rate. The gross mortgage margin is added to the index value to establish a new gross interest rate in the manner described by the calculation method.",
            "nullable": true
          },
          "arm_lifetime_cap_rate": {
            "type": "string",
            "example": "9.000",
            "description": "The maximum interest rate that can be applied during the loan term.",
            "nullable": true
          },
          "execution_date": {
            "type": "string",
            "example": "2019-12-20",
            "description": "The date documents were signed (executed).",
            "nullable": true
          },
          "original_loan_amount": {
            "type": "string",
            "example": "100000.00",
            "description": "Amount of the Mortgage as stated on the original note.",
            "nullable": true
          },
          "loan_maturity_date": {
            "type": "string",
            "example": "2034-03-01",
            "description": "The date when the loan is scheduled to be paid in full as reflected on the Note.",
            "nullable": true
          },
          "original_principal_and_interest_payment_amount": {
            "type": "string",
            "example": "500.50",
            "description": "The dollar amount of the P&I payment as stated on the Note. The P&I payment is usually obtained using the loan amount and interest rate to arrive at full amortization during the loan term.",
            "nullable": true
          },
          "lender_loan_identifier": {
            "type": "string",
            "example": "Loan123",
            "description": "The identifier assigned by the originating Lender to be referenced as the Loan ID/Number on all settlement documents, notes, riders, etc.",
            "nullable": true
          },
          "property_street_address": {
            "type": "string",
            "example": "100 Montgomery Street",
            "description": "The unstructured (Unparsed) street address of the subject property.",
            "nullable": true
          },
          "property_city": {
            "type": "string",
            "example": "San Francisco",
            "description": "The city in which the subject property is located.",
            "nullable": true
          },
          "property_state": {
            "type": "string",
            "example": "CA",
            "description": "The state in which the subject property is located.",
            "nullable": true
          },
          "property_postal_code": {
            "type": "string",
            "example": "99999",
            "description": "The postal code (zip code in the US) of the subject property. Zip code may be either 5 or 9 digits.",
            "nullable": true
          },
          "mers_min_number": {
            "type": "string",
            "example": "999938068729325206",
            "description": "Number used by MERS to identify loans. Referred to as the MIN, Mortgage Identification Number.",
            "nullable": true
          },
          "loan_originator_individual_unparsed_name": {
            "type": "string",
            "example": "Originator Individual",
            "description": "The name of the Loan Originator individual.",
            "nullable": true
          },
          "loan_originator_individual_nmls_id": {
            "type": "string",
            "example": "456789",
            "description": "The unique identifier of the Loan Originator individual that is assigned by the Nationwide Mortgage Licensing System.",
            "nullable": true
          },
          "loan_originator_company_unparsed_name": {
            "type": "string",
            "example": "Loan Originator Company",
            "description": "The name of the Loan Originator company.",
            "nullable": true
          },
          "loan_originator_company_nmls_id": {
            "type": "string",
            "example": "345678",
            "description": "The unique identifier of the Mortgage Originator company that is assigned by the Nationwide Mortgage Licensing System.",
            "nullable": true
          },
          "broker_individual_unparsed_name": {
            "type": "string",
            "example": "Broker Individual",
            "description": "The name of an individual acting as a mortgage broker for the loan.",
            "nullable": true
          },
          "broker_individual_nmls_id": {
            "type": "string",
            "example": "234567",
            "description": "The unique identifier of the Mortgage Broker individual that is assigned by the Nationwide Mortgage Licensing System.",
            "nullable": true
          },
          "broker_company_unparsed_name": {
            "type": "string",
            "example": "Broker Company",
            "description": "The name of the Mortgage Broker company.",
            "nullable": true
          },
          "broker_company_nmls_id": {
            "type": "string",
            "example": "123456",
            "description": "The unique identifier of the Mortgage Broker individual that is assigned by the Nationwide Mortgage Licensing System.",
            "nullable": true
          },
          "lender_unparsed_name": {
            "type": "string",
            "example": "Test Lender",
            "description": "The name of the party or entity designated as the lender for the loan.",
            "nullable": true
          },
          "tamper_sealed_at": {
            "type": "string",
            "example": "2023-07-25T20:06:17.903Z",
            "description": "When the tamper seal for the note was applied",
            "nullable": true
          },
          "registered_at": {
            "type": "string",
            "example": "2023-07-25T20:06:17.903Z",
            "description": "When the note was registered with MERS; null unless this package is the current (primary) version of the document",
            "nullable": true
          },
          "borrowers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/xml_borrower"
            }
          }
        }
      },
      "xml_borrower": {
        "type": "object",
        "properties": {
          "power_of_attorney_unparsed_name": {
            "type": "string",
            "nullable": true,
            "description": "The unparsed name of the individual acting with Power of Attorney for the borrower.",
            "example": "Bob Green"
          },
          "first_name": {
            "type": "string",
            "nullable": true,
            "description": "The first name of the borrower.",
            "example": "David"
          },
          "middle_name": {
            "type": "string",
            "nullable": true,
            "description": "The middle name of the borrower.",
            "example": "John"
          },
          "last_name": {
            "type": "string",
            "nullable": true,
            "description": "The last name of the borrower.",
            "example": "Green"
          },
          "name_suffix": {
            "type": "string",
            "nullable": true,
            "description": "The name suffix of the borrower.",
            "example": "Jr"
          },
          "order": {
            "type": "integer",
            "description": "The 1-based position of the borrower in the note XML.",
            "example": 1
          }
        }
      },
      "paginated_index_meta": {
        "type": "object",
        "description": "meta data for pagination",
        "properties": {
          "current_page": {
            "type": "integer",
            "example": 1,
            "description": "the current page"
          },
          "total_pages": {
            "type": "integer",
            "example": 2,
            "description": "the total number of pages"
          },
          "next_page": {
            "type": "integer",
            "example": 2,
            "description": "the next page"
          },
          "page_size": {
            "type": "integer",
            "example": 25,
            "description": "the number of items per page"
          },
          "total_count": {
            "type": "integer",
            "example": 35,
            "description": "the total number of items"
          }
        }
      },
      "paginated_index_links": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "example": "https://www.snapdocsevault.com/api/documents?page%5Bnumber%5D=1&page%5Bsize%5D=25",
            "description": "the current page"
          },
          "first": {
            "type": "string",
            "example": "https://www.snapdocsevault.com/api/documents?page%5Bnumber%5D=1&page%5Bsize%5D=25",
            "description": "the first page"
          },
          "prev": {
            "type": "string",
            "description": "the previous page",
            "nullable": true
          },
          "next": {
            "type": "string",
            "description": "the next page",
            "nullable": true
          },
          "last": {
            "type": "string",
            "description": "the last page"
          }
        },
        "description": "JSON:API pagination links. Do not follow them: they are built with `page[number]` and `page[size]`, which this endpoint does not read. Page with the `page` and `per_page` query parameters and the `meta` object instead.",
        "deprecated": true
      },
      "forbidden_error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Insufficient Scope, a scope of documents:read is required.",
            "description": "the scope the token is missing"
          }
        }
      },
      "signed_preview_error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "document not signed",
            "description": "either `document is pending seal, please try again` (the seal is still being applied; retry later) or `document not signed` (the version has not been signed and sealed)"
          }
        }
      },
      "xml_data_errors": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "no note file found for emortgage package"
            ],
            "description": "why the note XML could not be read"
          }
        }
      }
    }
  }
}