{
  "openapi": "3.0.1",
  "info": {
    "title": "eNote Creation",
    "version": "v1.1"
  },
  "tags": [
    {
      "name": "eNote Creation"
    }
  ],
  "paths": {
    "/document_requests": {
      "post": {
        "summary": "Create a new document request",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to create a new eNote in your eVault",
        "parameters": [],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "created a new version of the eNote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/document_request"
                }
              }
            }
          },
          "400": {
            "description": "bad request: some data was missing or invalid, or the eNote could not be created",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/document_request_missing_data"
                    },
                    {
                      "$ref": "#/components/schemas/document_request_mers_min_error"
                    },
                    {
                      "$ref": "#/components/schemas/document_request_redraw_error"
                    },
                    {
                      "$ref": "#/components/schemas/document_request_invalid_form_error"
                    },
                    {
                      "$ref": "#/components/schemas/document_request_creation_error"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: unable to proceed with authentication"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/document_request_payload"
              }
            }
          }
        }
      }
    },
    "/document_requests/{document_request_id}": {
      "get": {
        "summary": "Get document request by id",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to get the data on a document request you previously created",
        "parameters": [
          {
            "name": "document_request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
              "description": "the unique identifier for the document request"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/document_request"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/documents/{document_id}/audit_certificate": {
      "get": {
        "summary": "Retrieve a PDF audit certificate for the note across all versions",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to retrieve a PDF audit certificate for the note across all versions",
        "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: the audit certificate PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          },
          "404": {
            "description": "Not Found: the document is not in your eVault, or was not originated in it"
          }
        }
      }
    },
    "/documents/{document_id}/cancel": {
      "post": {
        "summary": "Cancel a pending unsigned note or reverse registration on a registered note",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to cancel a pending unsigned note or reverse registration on a registered note. An unsigned (initiated) note is canceled and returned with status 200. A registered (active) note has its MERS registration reversed and returns 202 with no body; an already deactivated (inactive) note also returns 202. A note that was already canceled is returned again with status 200.",
        "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: the note was canceled, or was already canceled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "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": {
                            "status": {
                              "type": "string",
                              "example": "canceled",
                              "description": "the status of the document",
                              "enum": [
                                "initiated",
                                "sealed",
                                "edelivered",
                                "active",
                                "inactive",
                                "canceled"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "accepted: the registration reversal was submitted to MERS, or the note was already deactivated. No body."
          },
          "400": {
            "description": "bad request: document cannot be canceled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "document can not be canceled",
                      "description": "one of \"document is locked\", \"document can not be canceled\" (for example a sealed or edelivered note), or a registration reversal error: \"document already de-activated\", \"document not registered\", \"evault does not have the correct rights on the document\""
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/documents/{document_id}/reverse_registration": {
      "post": {
        "summary": "Reverse registration in MERS for a registered note",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to reverse registration in MERS for a registered note",
        "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": {
          "202": {
            "description": "accepted: the registration reversal was submitted to MERS. No body."
          },
          "400": {
            "description": "bad request: the registration cannot be reversed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "document not registered",
                      "description": "one of \"document already de-activated\", \"document not registered\", \"document is locked\" or \"evault does not have the correct rights on the document\""
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/emortgage_packages/{emortgage_package_id}/preview": {
      "get": {
        "summary": "Retrieve a PDF preview copy of the note version before signing",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to retrieve a PDF preview copy of a note version before signing",
        "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 preview PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/emortgage_packages/{emortgage_package_id}/cancel": {
      "post": {
        "summary": "Cancel a specific version (emortgage package) of a document",
        "tags": [
          "eNote Creation"
        ],
        "description": "Use this endpoint to cancel one version (emortgage package) of a note, for example a redraw that is no longer needed. Canceling the primary version of an unsigned note also cancels the document. If the primary version belongs to a registered (active) note, its MERS registration is reversed instead and the package is returned with its status unchanged.",
        "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 cancel"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK: the package was canceled, was already canceled, or a registration reversal was submitted for its note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "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": {
                            "status": {
                              "type": "string",
                              "example": "canceled",
                              "description": "the status of the emortgage package",
                              "enum": [
                                "initiated",
                                "sealed",
                                "edelivered",
                                "canceled",
                                "pending_seal"
                              ]
                            },
                            "document_id": {
                              "type": "string",
                              "example": "dc6ebb60-e293-42b8-96ed-882e56d66f16",
                              "description": "The id of the document associated with the emortgage package"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad request: the package cannot be canceled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "emortgage package can not be canceled",
                      "description": "one of \"document is locked\", \"emortgage package can not be canceled\" (for example a sealed or edelivered version), or a registration reversal error: \"document already de-activated\", \"document not registered\", \"evault does not have the correct rights on the document\""
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: authentication is missing or invalid"
          },
          "403": {
            "description": "forbidden: your role does not allow to proceed"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  },
  "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": {
      "link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "uri to access the link",
            "example": "/b/123"
          },
          "rel": {
            "type": "string",
            "description": "relation of the link to the object",
            "example": "action"
          },
          "type": {
            "type": "string",
            "description": "http verb",
            "example": "GET"
          }
        },
        "description": "self descriptive link"
      },
      "borrower": {
        "type": "object",
        "required": [
          "email",
          "order"
        ],
        "description": "a borrower on the Note. Provide either name_attributes (an individual) or entity_attributes (a non-person borrower such as an LLC).",
        "properties": {
          "name_attributes": {
            "type": "object",
            "required": [
              "first_name",
              "last_name"
            ],
            "description": "name of an individual borrower; use entity_attributes instead for a non-person borrower",
            "properties": {
              "first_name": {
                "type": "string",
                "example": "David"
              },
              "middle_name": {
                "type": "string",
                "example": "John"
              },
              "last_name": {
                "type": "string",
                "example": "Green"
              },
              "name_suffix": {
                "type": "string",
                "example": "Jr"
              }
            }
          },
          "entity_attributes": {
            "type": "object",
            "required": [
              "name"
            ],
            "description": "name of a non-person borrower; use name_attributes instead for an individual",
            "properties": {
              "name": {
                "type": "string",
                "example": "Green Family Holdings LLC"
              }
            }
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "david.green@example.com"
          },
          "order": {
            "type": "integer",
            "example": 1,
            "description": "order of the borrower to appear in the Note"
          },
          "trust": {
            "type": "object",
            "description": "trust details when the borrower signs on behalf of a trust",
            "properties": {
              "unparsed_name": {
                "type": "string",
                "example": "The Green Family Trust"
              },
              "established_date": {
                "type": "string",
                "example": "January 15, 2010"
              },
              "trustee_unparsed_name": {
                "type": "string",
                "example": "David Green, Trustee"
              }
            }
          },
          "power_of_attorney": {
            "type": "object",
            "description": "attorney-in-fact details when the borrower signs under a power of attorney",
            "properties": {
              "unparsed_name": {
                "type": "string",
                "example": "Jane Green"
              },
              "signing_capacity_text_description": {
                "type": "string",
                "example": "as Attorney-in-Fact"
              }
            }
          }
        }
      },
      "us_address": {
        "type": "object",
        "required": [
          "street_address",
          "city",
          "state",
          "postal_code"
        ],
        "properties": {
          "street_address": {
            "type": "string",
            "description": "full street address",
            "example": "100 Montgomery Street"
          },
          "city": {
            "type": "string",
            "example": "San Francisco"
          },
          "state": {
            "type": "string",
            "example": "CA",
            "pattern": "^[A-Z]{2}$",
            "description": "2 character state code"
          },
          "postal_code": {
            "type": "string",
            "example": "94104",
            "description": "exactly 5 or exactly 9 digits"
          }
        }
      },
      "broker_party": {
        "type": "object",
        "properties": {
          "unparsed_name": {
            "type": "string",
            "nullable": true,
            "example": "Simple Broker Services"
          },
          "contact_name": {
            "type": "string",
            "nullable": true,
            "example": "Pat Broker"
          },
          "contact_NMLSID": {
            "type": "string",
            "nullable": true,
            "example": "123456",
            "pattern": "^(\\d{4,12}|N/?A)$",
            "description": "4-12 digits, or N/A"
          }
        }
      },
      "document_request_payload": {
        "type": "object",
        "properties": {
          "document_request": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "description": "data to create the eNote. Dates are written as \"<full month name> <D>, <YYYY>\" (for example \"December 20, 2019\"). Dollar amounts are strings with optional thousands separators, exactly 2 decimals when a decimal point is present, and at most 999,999,999.99. Percentages are strings from 0 up to but excluding 100. Postal codes are exactly 5 or exactly 9 digits. For the deferred-payment form 3297.06, late_charge, loan.scheduled_first_payment_date and loan.original_principal_and_interest_payment_amount are optional.",
                "required": [
                  "form",
                  "mers_min",
                  "loan_number",
                  "execution",
                  "property_address",
                  "loan",
                  "lender",
                  "pay_to",
                  "late_charge",
                  "borrowers_attributes"
                ],
                "properties": {
                  "form": {
                    "type": "string",
                    "example": "3200",
                    "description": "Fannie Mae form number of the eNote. Fixed-rate (3200 series) and variable-rate (3441, 3442, 3501, 3502 and 3522 series) forms are available to every eVault. The FHA, VA and USDA variants (.81, .82, .83), second-lien forms (39xx), the deferred-payment form 3297.06, the DocMagic second lien (DMSL) and the second-mortgage forms (3015 series) are enabled per eVault and return 400 when not enabled. eHELOC form codes are documented in the eHELOC Creation reference.",
                    "enum": [
                      "3200",
                      "3202",
                      "3210",
                      "3220",
                      "3230",
                      "3233",
                      "3239",
                      "3247",
                      "3246",
                      "3249",
                      "3250",
                      "3200.81",
                      "3202.81",
                      "3210.81",
                      "3220.81",
                      "3230.81",
                      "3233.81",
                      "3239.81",
                      "3247.81",
                      "3246.81",
                      "3249.81",
                      "3250.81",
                      "3200.82",
                      "3202.82",
                      "3210.82",
                      "3220.82",
                      "3230.82",
                      "3233.82",
                      "3239.82",
                      "3247.82",
                      "3246.82",
                      "3249.82",
                      "3250.82",
                      "3200.83",
                      "3202.83",
                      "3210.83",
                      "3220.83",
                      "3230.83",
                      "3233.83",
                      "3239.83",
                      "3247.83",
                      "3246.83",
                      "3249.83",
                      "3250.83",
                      "3441",
                      "3441.02",
                      "3441.10",
                      "3441.30",
                      "3441.39",
                      "3441.46",
                      "3441.47",
                      "3441.49",
                      "3441.50",
                      "3442",
                      "3442.02",
                      "3442.10",
                      "3442.30",
                      "3442.39",
                      "3442.46",
                      "3442.47",
                      "3442.49",
                      "3442.50",
                      "3501",
                      "3501.02",
                      "3501.10",
                      "3501.30",
                      "3501.39",
                      "3501.46",
                      "3501.47",
                      "3501.49",
                      "3501.50",
                      "3502",
                      "3502.02",
                      "3502.10",
                      "3502.30",
                      "3502.39",
                      "3502.46",
                      "3502.47",
                      "3502.49",
                      "3502.50",
                      "3522",
                      "3522.02",
                      "3522.10",
                      "3522.30",
                      "3522.39",
                      "3522.46",
                      "3522.47",
                      "3522.49",
                      "3522.50",
                      "3903",
                      "3904",
                      "3905",
                      "3906",
                      "3908",
                      "3909",
                      "3910",
                      "3911",
                      "3913",
                      "3914",
                      "3916",
                      "3917",
                      "3918",
                      "3919",
                      "3921",
                      "3923",
                      "3930",
                      "3931",
                      "3936",
                      "3937",
                      "3938",
                      "3939",
                      "3945",
                      "3947",
                      "3948",
                      "3950",
                      "3297.06",
                      "DMSL",
                      "3015",
                      "3015.01",
                      "3015.03",
                      "3015.04",
                      "3015.05",
                      "3015.06",
                      "3015.07",
                      "3015.09",
                      "3015.10",
                      "3015.11",
                      "3015.13",
                      "3015.14",
                      "3015.15",
                      "3015.16",
                      "3015.17",
                      "3015.18",
                      "3015.19",
                      "3015.21",
                      "3015.23",
                      "3015.24",
                      "3015.25",
                      "3015.27",
                      "3015.34",
                      "3015.35",
                      "3015.28",
                      "3015.30",
                      "3015.31",
                      "3015.36",
                      "3015.37",
                      "3015.38",
                      "3015.39",
                      "3015.40",
                      "3015.42",
                      "3015.43",
                      "3015.44",
                      "3015.48",
                      "3015.49",
                      "3015.50",
                      "3015.51"
                    ]
                  },
                  "include": {
                    "type": "object",
                    "description": "specifies which optional state specific language to include in the note",
                    "properties": {
                      "AL": {
                        "type": "object",
                        "description": "Alabama specific language",
                        "properties": {
                          "use_caution_text": {
                            "type": "boolean",
                            "description": "whether to include caution text at the end of the note for a note with property address in Alabama",
                            "default": false
                          },
                          "use_late_charge_text": {
                            "type": "boolean",
                            "description": "whether to include specific text in a note with property address in Alabama in Late Charge and Overdue Payment section",
                            "default": false
                          }
                        }
                      },
                      "IN": {
                        "type": "object",
                        "description": "Indiana specific language",
                        "properties": {
                          "use_caution_text": {
                            "type": "boolean",
                            "description": "whether to include caution text at the end of the note for a note with property address in Indiana",
                            "default": false
                          }
                        }
                      },
                      "MD": {
                        "type": "object",
                        "description": "Maryland specific language",
                        "properties": {
                          "use_choice_of_law_text": {
                            "type": "boolean",
                            "description": "whether to include choice of law text at the end of the note for a note with property address in Maryland",
                            "default": false
                          }
                        }
                      },
                      "MS": {
                        "type": "object",
                        "description": "Mississippi specific language",
                        "properties": {
                          "use_late_charge_text": {
                            "type": "boolean",
                            "description": "whether to include specific text in a note with property address in Mississippi in Lat Charge and Overdue Payment section",
                            "default": false
                          }
                        }
                      },
                      "TX": {
                        "type": "object",
                        "description": "Texas specific language",
                        "properties": {
                          "use_caution_text": {
                            "type": "boolean",
                            "description": "whether to include caution text at the end of the note for a note with property address in Texas",
                            "default": false
                          }
                        }
                      }
                    }
                  },
                  "mers_min": {
                    "type": "string",
                    "example": "999938044537169292",
                    "description": "the MERS mortgage identification number for the document: 18 digits with a valid Luhn check digit. Reusing the MIN of a document already in your eVault creates a new version (redraw) of that document."
                  },
                  "loan_number": {
                    "type": "string",
                    "example": "0009384568",
                    "description": "the identifier assigned by the originating lender to be referenced as the loan ID/Number on all settlement documents, notes, riders, etc…"
                  },
                  "registry_operator_name": {
                    "type": "string",
                    "example": "MERSCORP Holdings, Inc., a Delaware Corporation",
                    "description": "name of the registry operator printed on the Note"
                  },
                  "broker_mers_org_id": {
                    "type": "string",
                    "example": "1234567",
                    "description": "the MERS org ID of the broker organization. When set, a Registration And Transfer of Control action will be used to register the note."
                  },
                  "execution": {
                    "type": "object",
                    "required": [
                      "city",
                      "state",
                      "date"
                    ],
                    "properties": {
                      "city": {
                        "type": "string",
                        "description": "city of execution",
                        "example": "Sugarland"
                      },
                      "state": {
                        "type": "string",
                        "description": "state of the execution location, spelled out in full",
                        "example": "Texas"
                      },
                      "date": {
                        "type": "string",
                        "description": "date of execution",
                        "example": "December 20, 2019"
                      }
                    }
                  },
                  "closing_agent": {
                    "type": "object",
                    "description": "the settlement or closing agent for the loan",
                    "properties": {
                      "type": {
                        "type": "string",
                        "example": "SettlementAgent"
                      },
                      "unparsed_name": {
                        "type": "string",
                        "example": "Total Title Insurance - TX"
                      },
                      "contact_name": {
                        "type": "string",
                        "example": "Kevin Closer"
                      },
                      "address": {
                        "$ref": "#/components/schemas/us_address"
                      }
                    }
                  },
                  "property_address": {
                    "type": "object",
                    "description": "address of the property being purchased",
                    "required": [
                      "street_address",
                      "city",
                      "postal_code",
                      "state",
                      "county"
                    ],
                    "properties": {
                      "street_address": {
                        "type": "string",
                        "description": "full street address",
                        "example": "100 Montgomery Street"
                      },
                      "direction_prefix": {
                        "type": "string",
                        "nullable": true,
                        "description": "street direction prefix",
                        "example": "N"
                      },
                      "direction_suffix": {
                        "type": "string",
                        "nullable": true,
                        "description": "street direction suffix",
                        "example": "SW"
                      },
                      "unit": {
                        "type": "string",
                        "nullable": true,
                        "description": "apartment, suite or unit",
                        "example": "Suite 200"
                      },
                      "city": {
                        "type": "string",
                        "example": "San Francisco"
                      },
                      "postal_code": {
                        "type": "string",
                        "example": "94104",
                        "description": "exactly 5 or exactly 9 digits"
                      },
                      "state": {
                        "type": "string",
                        "example": "CA",
                        "pattern": "^[A-Z]{2}$",
                        "description": "2 character state code"
                      },
                      "county": {
                        "type": "string",
                        "example": "San Francisco"
                      },
                      "country": {
                        "type": "string",
                        "default": "USA"
                      }
                    }
                  },
                  "loan": {
                    "type": "object",
                    "description": "information about the loan. arm and rate_adjustment are required for every variable-rate form (3441, 3442, 3501, 3502 and 3522 series) and ignored otherwise.",
                    "required": [
                      "scheduled_first_payment_date",
                      "loan_maturity_date",
                      "original_principal_and_interest_payment_amount",
                      "terms"
                    ],
                    "properties": {
                      "scheduled_first_payment_date": {
                        "type": "string",
                        "example": "April 1, 2019"
                      },
                      "loan_maturity_date": {
                        "type": "string",
                        "example": "March 1, 2034"
                      },
                      "original_principal_and_interest_payment_amount": {
                        "type": "string",
                        "description": "the dollar amount of the P&I payment as stated on the Note",
                        "example": "1,500.00"
                      },
                      "terms": {
                        "type": "object",
                        "description": "terms of the loan. payment_remittance_day is required for fixed-rate forms; agency_case_identifier is required for FHA and VA forms.",
                        "required": [
                          "original_loan_amount",
                          "note_rate_percent"
                        ],
                        "properties": {
                          "original_loan_amount": {
                            "type": "string",
                            "description": "amount of the mortgage as stated on the original Note",
                            "example": "1,349,000.00"
                          },
                          "note_rate_percent": {
                            "type": "string",
                            "description": "the interest rate as disclosed in the Note",
                            "example": "4.300"
                          },
                          "payment_remittance_day": {
                            "type": "string",
                            "description": "the day of the month on which the loan payment is to be remitted; required for fixed-rate forms",
                            "example": "3",
                            "pattern": "^\\d{1,2}$"
                          },
                          "agency_case_identifier": {
                            "type": "string",
                            "description": "the agency case identifier, required for FHA and VA loans: letters and digits only, at least 10 characters for FHA and at least 12 for VA",
                            "example": "123456789012"
                          }
                        }
                      },
                      "arm": {
                        "type": "object",
                        "description": "adjustable-rate terms; required for variable-rate forms",
                        "properties": {
                          "lifetime_cap_rate": {
                            "type": "string",
                            "description": "the maximum interest rate over the life of the loan; payment_adjustment_lifetime_cap_percent is accepted as an alias",
                            "example": "9.300"
                          },
                          "payment_adjustment_lifetime_cap_percent": {
                            "type": "string",
                            "description": "alias of lifetime_cap_rate; send one or the other",
                            "example": "9.300"
                          },
                          "index_margin_percent": {
                            "type": "string",
                            "description": "the margin added to the index to determine the new rate",
                            "example": "2.750"
                          },
                          "lifetime_floor_percent": {
                            "type": "string",
                            "description": "the minimum interest rate over the life of the loan",
                            "example": "2.750"
                          }
                        }
                      },
                      "rate_adjustment": {
                        "type": "object",
                        "description": "rate adjustment terms; required for variable-rate forms",
                        "properties": {
                          "first_rate_adjustment_date": {
                            "type": "string",
                            "description": "date of the first interest rate change",
                            "example": "April 1, 2026"
                          },
                          "first_change_cap_rate": {
                            "type": "string",
                            "description": "the maximum rate at the first change",
                            "example": "6.300"
                          },
                          "first_change_floor_rate": {
                            "type": "string",
                            "description": "the minimum rate at the first change",
                            "example": "2.750"
                          },
                          "subsequent_rate_adjustment_months": {
                            "type": "string",
                            "description": "months between rate changes after the first change",
                            "example": "12"
                          },
                          "subsequent_cap_percent": {
                            "type": "string",
                            "description": "the maximum rate change at each subsequent change",
                            "example": "2.000"
                          }
                        }
                      },
                      "originator_unparsed_name": {
                        "type": "string",
                        "description": "loan originator (company) name",
                        "example": "Simple Lending Mortgage Company"
                      },
                      "originator_NMLSID": {
                        "type": "string",
                        "description": "loan originator NMLSID: 4-12 digits, or N/A",
                        "example": "101101",
                        "pattern": "^(\\d{4,12}|N/?A)$"
                      },
                      "second_lien_associated_doc_date": {
                        "type": "string",
                        "description": "date of the security instrument (mortgage or deed of trust) securing a second-lien Note",
                        "example": "December 20, 2019"
                      },
                      "construction_commencement_days": {
                        "type": "integer",
                        "nullable": true,
                        "description": "days until construction commences, for construction loan Notes",
                        "example": 30
                      },
                      "construction_completion_date": {
                        "type": "string",
                        "nullable": true,
                        "description": "date construction is due to complete, for construction loan Notes",
                        "example": "December 20, 2020"
                      }
                    }
                  },
                  "loan_originators_attributes": {
                    "type": "array",
                    "description": "loan originator company and individual for the Note. See lender for the rule on which originator fields must be present.",
                    "items": {
                      "type": "object",
                      "required": [
                        "order"
                      ],
                      "properties": {
                        "order": {
                          "type": "integer",
                          "example": 1
                        },
                        "company_unparsed_name": {
                          "type": "string",
                          "nullable": true,
                          "example": "Simple Lending Mortgage Company"
                        },
                        "company_NMLSID": {
                          "type": "string",
                          "nullable": true,
                          "example": "123455",
                          "pattern": "^(\\d{4,12}|N/?A)$",
                          "description": "4-12 digits, or N/A"
                        },
                        "individual_unparsed_name": {
                          "type": "string",
                          "nullable": true,
                          "example": "Peter Brokeman"
                        },
                        "individual_NMLSID": {
                          "type": "string",
                          "nullable": true,
                          "example": "400400",
                          "pattern": "^(\\d{4,12}|N/?A)$",
                          "description": "4-12 digits, or N/A"
                        }
                      }
                    }
                  },
                  "lender": {
                    "type": "object",
                    "description": "information about the lender. The request must identify the loan originator in exactly one of these ways: lender.contact_name and/or lender.contact_NMLSID; a loan_originators_attributes entry with individual_unparsed_name and/or individual_NMLSID; or both broker_company and broker_individual. Otherwise the request fails with 400 \"Invalid loan originator data\".",
                    "required": [
                      "unparsed_name"
                    ],
                    "properties": {
                      "unparsed_name": {
                        "type": "string",
                        "description": "the name of the party or entity designated as the lender for the loan",
                        "example": "Simple Lending Mortgage Company, a Texas Corporation"
                      },
                      "contact_name": {
                        "type": "string",
                        "nullable": true,
                        "example": "Peter Brokeman"
                      },
                      "contact_NMLSID": {
                        "type": "string",
                        "nullable": true,
                        "example": "400400",
                        "pattern": "^(\\d{4,12}|N/?A)$",
                        "description": "4-12 digits, or N/A"
                      },
                      "street_address": {
                        "type": "string",
                        "nullable": true,
                        "example": "100 Montgomery Street"
                      },
                      "city": {
                        "type": "string",
                        "nullable": true,
                        "example": "San Francisco"
                      },
                      "state": {
                        "type": "string",
                        "nullable": true,
                        "example": "CA",
                        "pattern": "^[A-Z]{2}$",
                        "description": "2 character state code"
                      },
                      "postal_code": {
                        "type": "string",
                        "nullable": true,
                        "example": "94104",
                        "description": "exactly 5 or exactly 9 digits"
                      }
                    }
                  },
                  "broker_company": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/broker_party"
                      }
                    ],
                    "description": "the broker company; send together with broker_individual instead of a lender contact or loan originator individual"
                  },
                  "broker_individual": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/broker_party"
                      }
                    ],
                    "description": "the individual broker; send together with broker_company"
                  },
                  "pay_to": {
                    "type": "object",
                    "description": "address where to send the loan payment",
                    "required": [
                      "street_address",
                      "city",
                      "postal_code",
                      "state"
                    ],
                    "properties": {
                      "unparsed_name": {
                        "type": "string",
                        "description": "name of the payee",
                        "example": "Simple Lending Mortgage Company"
                      },
                      "street_address": {
                        "type": "string",
                        "description": "full street address",
                        "example": "100 Montgomery Street"
                      },
                      "city": {
                        "type": "string",
                        "example": "San Francisco"
                      },
                      "postal_code": {
                        "type": "string",
                        "example": "94104",
                        "description": "exactly 5 or exactly 9 digits"
                      },
                      "state": {
                        "type": "string",
                        "example": "CA",
                        "pattern": "^[A-Z]{2}$",
                        "description": "2 character state code"
                      }
                    }
                  },
                  "borrower_address": {
                    "type": "object",
                    "description": "the borrower's mailing address when it differs from the property address",
                    "properties": {
                      "street_address": {
                        "type": "string",
                        "nullable": true,
                        "example": "200 Market Street"
                      },
                      "city": {
                        "type": "string",
                        "nullable": true,
                        "example": "San Francisco"
                      },
                      "state": {
                        "type": "string",
                        "nullable": true,
                        "example": "CA",
                        "pattern": "^[A-Z]{2}$",
                        "description": "2 character state code"
                      },
                      "postal_code": {
                        "type": "string",
                        "nullable": true,
                        "example": "94105",
                        "description": "exactly 5 or exactly 9 digits"
                      }
                    }
                  },
                  "late_charge": {
                    "type": "object",
                    "description": "late charge terms. maximum_amount is required for the West Virginia forms (3249, 3441.49, 3442.49, 3501.49, 3502.49, 3522.49, or a 3441/3442/3522 form with a WV property address) and for DMSL. On second-lien and second-mortgage forms the amounts also accept N/A.",
                    "required": [
                      "grace_period",
                      "rate"
                    ],
                    "properties": {
                      "grace_period": {
                        "type": "string",
                        "description": "the grace period in days for this loan before a late charge will be applied",
                        "example": "11"
                      },
                      "rate": {
                        "type": "string",
                        "description": "the percentage a borrower is required to pay for failure to make a regular installment within the period specified on the Note",
                        "example": "4.321"
                      },
                      "maximum_amount": {
                        "type": "string",
                        "description": "maximum late charge amount required by West Virginia",
                        "example": "1,000.00"
                      },
                      "minimum_amount": {
                        "type": "string",
                        "description": "minimum late charge amount",
                        "example": "10.00"
                      }
                    }
                  },
                  "borrowers_attributes": {
                    "type": "array",
                    "minItems": 1,
                    "description": "the borrowers on the Note, at least one",
                    "items": {
                      "$ref": "#/components/schemas/borrower"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "document_request": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "5279e4ca-cd04-49b3-9863-d94e9acc35fe",
                "description": "The document request id"
              },
              "type": {
                "type": "string",
                "example": "document_requests",
                "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"
                  },
                  "signing_path_id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "5696b7cb-1a2d-4842-a035-c24ac5b2c6c8",
                    "description": "id of the signing path object"
                  },
                  "document_id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "94028d76-bdd0-45a9-9fdd-d0f49ae5726f",
                    "description": "id of the document object"
                  },
                  "emortgage_package_id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "e4bac3b7-4133-4b3f-a41e-75c65a14bb95",
                    "description": "id of this version of the document"
                  },
                  "registration_status": {
                    "type": "string",
                    "example": "initiated",
                    "description": "registration status of this document: \"active\" once the document is registered with MERS and this is its primary version, \"sealed\" while it is sealed or waiting to re-register a redraw, otherwise the status of this version of the document",
                    "enum": [
                      "initiated",
                      "sealed",
                      "edelivered",
                      "canceled",
                      "active"
                    ]
                  },
                  "document_status": {
                    "type": "string",
                    "example": "initiated",
                    "description": "deprecated alias of registration_status",
                    "enum": [
                      "initiated",
                      "sealed",
                      "edelivered",
                      "canceled",
                      "active"
                    ]
                  },
                  "emortgage_package_status": {
                    "type": "string",
                    "example": "initiated",
                    "description": "status of this version of the document",
                    "enum": [
                      "initiated",
                      "sealed",
                      "canceled",
                      "edelivered",
                      "pending_seal"
                    ]
                  },
                  "document_registered_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "example": null,
                    "description": "time the document was registered to MERS, null until registered"
                  },
                  "signing_participant_keys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "6da9114ac18d3c87d0d561ef1"
                    },
                    "description": "signing token key of each participant on the current signing path, in borrower order; each is the last segment of that borrower's signing_url"
                  },
                  "borrowers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "id of the Borrower object"
                        },
                        "order": {
                          "type": "integer",
                          "description": "Borrower order number",
                          "example": 1
                        },
                        "full_name": {
                          "type": "string",
                          "description": "Full name of the borrower",
                          "example": "David F. Green Jr"
                        },
                        "email": {
                          "type": "string",
                          "description": "email of the borrower",
                          "example": "david.green@example.com"
                        },
                        "signing_url": {
                          "type": "string",
                          "description": "uri for the borrower to access the document for signing",
                          "example": "/b/6da9114ac18d3c87d0d561ef1"
                        },
                        "status": {
                          "type": "string",
                          "description": "status of the signing participant",
                          "enum": [
                            "created",
                            "in_progress",
                            "signed",
                            "canceled",
                            "declined",
                            "ready_to_view"
                          ]
                        },
                        "signed_at": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "example": null,
                          "description": "time the borrower signed, null until signed"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/link"
                          },
                          "description": "self descriptive links to access: the signing experience (\"signing\"), download the pdf preview of the eNote (\"preview\"), update the borrower tax identifier (\"update\")"
                        }
                      }
                    }
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/link"
                    },
                    "description": "self descriptive link to: cancel a document (\"cancel\"), reverse its MERS registration (\"reverse_registration\"), download the pdf preview of the document (\"preview\"), download the signed pdf preview of the document (\"signed_preview\"), get the audit certificate (\"audit_certificate\"), get the document_request object (\"self\")"
                  }
                }
              }
            }
          }
        }
      },
      "document_request_missing_data": {
        "title": "Missing data",
        "type": "object",
        "description": "the payload failed schema validation, or did not identify the loan originator (\"Invalid loan originator data: ...\")",
        "properties": {
          "errors": {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "The property '<json path>' did not contain a required property of '<property name>' in schema document-creation-payload"
                }
              }
            }
          }
        }
      },
      "document_request_mers_min_error": {
        "title": "MERS MIN error",
        "type": "object",
        "description": "mers_min is not a valid MIN",
        "properties": {
          "errors": {
            "type": "object",
            "properties": {
              "min_number": {
                "type": "array",
                "description": "one of \"is invalid\" (Luhn check digit does not match) or \"is the wrong length (should be 18 characters)\"",
                "items": {
                  "type": "string",
                  "example": "is invalid"
                }
              }
            }
          }
        }
      },
      "document_request_redraw_error": {
        "type": "object",
        "description": "mers_min matches an existing document that cannot be redrawn",
        "properties": {
          "errors": {
            "type": "object",
            "properties": {
              "mers_min": {
                "type": "string",
                "description": "one of \"MIN number already exists but the eVault does not have controller rights\", \"Document matching MIN number is currently locked\" or \"MIN number already exists on deactivated document that cannot be redrawn\"",
                "example": "MIN number already exists but the eVault does not have controller rights"
              }
            }
          }
        }
      },
      "document_request_invalid_form_error": {
        "title": "Invalid form",
        "type": "object",
        "description": "form is not a form number, or is a form that is not enabled for this eVault",
        "properties": {
          "errors": {
            "type": "object",
            "properties": {
              "form": {
                "type": "string",
                "description": "one of \"Invalid form type\", \"eVault is not enabled for FHA, VA, or USDA eNotes. This requires lender onboarding.\" or \"eVault is not enabled for 2nd lien eNotes. This requires lender onboarding.\"",
                "example": "Invalid form type"
              }
            }
          }
        }
      },
      "document_request_creation_error": {
        "type": "object",
        "description": "the request was well formed but the eNote could not be created. errors is keyed by what failed: \"document_request\" (\"is required\" when the document_request wrapper is missing), \"document_creation\" (the document service rejected the request), \"success_of_creation_service\" (\"Failed to retrieve document\"), \"validation_of_creation_service\" (the generated SMART Doc failed validation), or a record attribute such as \"emortgage_packages.property_address.county\" with an array of messages",
        "properties": {
          "errors": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "document_creation": "failed with message: something bad happened"
            }
          }
        }
      }
    }
  }
}