Skip to main content
This endpoint is in beta. You can use it today, but its request and response contract may change while it is in beta, including in ways that are not backward compatible. That covers the response fields, the error codes and the import report. Read What beta means for your integration before you build on it.
MISMO import is turned on per organization. To use it, contact your Pylon representative and ask for MISMO import to be enabled for your organization. Mention whether you need it in sandbox, production or both.
The MISMO import endpoint turns a MISMO XML file into a new Pylon loan in a single request. It reads borrowers, income, assets, owned real estate, interested parties and the subject property out of the file. You don’t have to recreate each of them with separate GraphQL mutations. Common uses:
  • Bringing in a loan from another system, such as a 1003 export from another loan origination system or an AUS submission file.
  • Starting a re-application from an existing Pylon loan. Export the existing loan as a MISMO file, then import that file as a new loan. See Re-applying from an existing loan.
A file rarely carries everything a loan needs. The import succeeds as long as the file describes a deal and a loan. Data the import read but couldn’t use is listed in an import report, so you can fill it in afterwards. Some kinds of data are never imported. See What gets imported.

At a glance

Environments

The endpoint exists in both environments, once it is enabled for your organization in that environment. Only the host differs:
Access tokens are environment-specific. A sandbox token will not authenticate against production, and vice versa. See the authentication guide.
Importing a file records credit consent for every borrower in it. Each imported borrower is saved with electronic consent to both a hard and a soft credit pull, dated at the time of the import. This lets you run credit on the new loan right away.A MISMO file does not carry consent, so the import cannot check for it. Only import a file once you have each borrower’s authorization to pull their credit for this application. This applies to re-applications too: consent given for the original loan does not carry over.

Making the request

Send the file as multipart/form-data in a field named mismo-file. Send exactly one file per request. Do not set the Content-Type header yourself. Let your HTTP client set it, so that the multipart boundary is included. The loan is created in the organization your access token belongs to. Nothing in the file can place it anywhere else.
Call this endpoint from your server, not from a browser. Your access token must never be exposed to client-side code. If your users upload files in a browser, send the file to your backend and forward it from there.

What the file must contain

The import needs very little to succeed, but the file has to be a MISMO document of a version it reads.
  • The root element is MESSAGE. A namespace prefix on it is fine. Any other root element is rejected as MISMO_UPLOAD_PARSE_FAILURE.
  • A supported version. MISMO 3.4 and MISMO 3.6 are supported. The version is read from the MISMOReferenceModelIdentifier attribute on MESSAGE, or from MISMOLogicalDataDictionaryIdentifier when the first is absent. Identifiers such as 3.4.032420160128 or 3.6.0 are accepted. A file that declares another version, such as 3.5.021220160120, is rejected as MISMO_UPLOAD_UNSUPPORTED_VERSION. A file that declares no version, or a version identifier that isn’t in the usual major.minor form, is read as MISMO 3.4.
  • A deal. The file needs a DEAL under DEAL_SETS/DEAL_SET/DEALS. Only the first deal in the file is imported. Any further deals are ignored without being reported, so send one deal per file.
  • One subject loan. Inside the deal’s LOANS, the loan with LoanRoleType set to SubjectLoan is imported. If no loan carries that role, the first LOAN is used. A deal with more than one SubjectLoan is rejected, because the import can’t tell which loan you meant.
  • UTF-8 encoding. The file is always read as UTF-8. A file saved in another encoding, such as Windows-1252, usually still imports, but accented or special characters in names and addresses turn into replacement characters (�). Convert the file to UTF-8 before you upload it.
  • No complex DOCTYPE. A plain <!DOCTYPE MESSAGE> declaration is fine. A DOCTYPE with an external identifier or an internal subset is rejected, and so is extremely deep element nesting (413, MISMO_UPLOAD_EXCESSIVE_NESTING). Real MISMO exports don’t use either.
  • 50 MB or smaller (52,428,800 bytes). Larger files are rejected with HTTP 413.
Everything else is optional. Missing details, such as a borrower’s email address or a property’s county, don’t fail the import. They are listed in the import report instead.

What gets imported

The primary borrower is the borrower the file classifies as primary (BorrowerClassificationType of Primary). If no borrower is classified that way, the first borrower in the file is the primary borrower. Some data is imported differently from how it appears in the file:
  • Owned real estate arrives with no mortgage attached. Liabilities aren’t imported, so every owned property looks owned free and clear until you link its mortgage. When the file shows a lien on an owned property, the import report flags it as CRITICAL. After you pull credit, link each mortgage to its property with the attachOwnedPropertyLiability mutation. See Property-associated liabilities.
  • Self-reported debts are not carried over. Debts a credit bureau may not report, such as an HOA lien, garnishments, delinquent taxes or a private personal loan, must be added by hand. Otherwise DTI is understated. See Managing self-reported liabilities.
  • Addresses without a residency basis are left out. An address in a borrower’s history that doesn’t state whether the borrower owned, rented or lived rent-free is not imported, and it is listed in the report. Add it back on the borrower.
  • Records that can’t be attached are skipped. For example, an asset or a rental income that isn’t linked to any borrower, a non-borrowing owner with no name, or a party in a role Pylon doesn’t track. Each one is listed in the report.
  • A few MISMO 3.6 values can’t be imported yet. Each one is listed in the report with the element’s name from the file.
  • Missing names and email addresses read as empty strings. When the file has no first name, last name or email address for a borrower, GraphQL returns "" for that field, not null.

Successful response

A successful import returns HTTP 201 Created with a JSON body:
Treat any 2xx status as success rather than checking for 201 exactly.

Reading the new loan

Use loan_id with the GraphQL API to read what was imported:

The import report

The import report lists the data the import read from the file but couldn’t use. Data listed under “Not imported” in What gets imported is dropped without being reported. Each finding points to the Pylon record it concerns, so you can send your user straight to the right borrower, asset or property to fix it. The import never fails because of these findings. Read it with the mismoImport query, using the import_id from the response. It needs a token with the read:loan scope. You can also reach it from the loan, as loan { mismoImport { ... } }.
The report is kept for 24 hours. After that, mismoImport returns null and loan.mismoImport is null. If you need the findings for longer, read the report soon after the import and store what you need. A null result can also mean the ID is unknown or belongs to a loan your token can’t read. These cases are deliberately indistinguishable.
Each item in nonAdoptions is one finding, in the order the import met it in the file. Switch on __typename:
  • MismoFieldNonAdoption: data that wasn’t imported for a record. When record is set, the record exists and one of its fields (fields) is empty or needs correcting. When record is null, the record was never created, and entity tells you what kind of record to create, for example a borrower’s income.
  • MismoUnrepresentableElement: a MISMO 3.6 element that Pylon can’t store yet. element is the element’s name as it appears in the file. There’s nothing on the loan to fix, but the data from the file was lost.
Treat the report as loan data. Show it only to people who are allowed to see the loan, and keep it out of your logs.

Severity

Reason

The reason enum is shared with other Pylon features and contains more values than the ones above. Treat any value you don’t recognize as “review this finding”.

Legacy missing fields

missing_fields in the upload response carries the same findings in an older, flatter format. It is deprecated. Use the import report for new integrations.
Don’t parse field or ref. Their format may change while the endpoint is in beta. Use them for display only.

Common follow-ups after an import

Some gaps block later steps, so check for these first:
  • Every CRITICAL finding. Each one changes how DTI is calculated until it’s resolved.
  • The subject property’s address and county. A loan can’t be priced without a complete subject property address, including its county.
  • Each borrower’s email address. Borrowers without one can’t receive disclosures.
  • Credit. No credit data is imported, so pull credit before you price the loan. Then link mortgages to owned properties.

Re-applying from an existing loan

When a borrower needs a new application for a loan they’ve already started with you, for example to move to a different property or program, or to restart a file that was withdrawn, you can start the new loan from the old one. Export the existing loan as a MISMO file, then import that file. The borrowers, income, assets, owned real estate and property details come across without being retyped.
1

Export the existing loan

Call the export mutation on the existing loan. It needs a token with the update:loan scope, and it returns a temporary download URL for a MISMO 3.4 file of the loan.
Exporting doesn’t change the existing loan. It works even on a loan that can no longer be edited.If the export fails, the GraphQL error carries extensions.errorDetails.code of LOAN_OPERATION_ERROR. A loan created a moment ago isn’t available for export yet, so retry a few times with backoff. If it keeps failing, contact Pylon support with the error’s errorId.
2

Download the file

Fetch downloadUrl with a plain GET. Don’t send your Authorization header with this request, because the URL already carries its own authorization.
Treat downloadUrl as a secret. Anyone who has the URL can download the file, which contains the borrowers’ full personal information. Download it right away, and don’t log, store or share the URL. It stops working after at most three days.
3

Get the borrowers' authorization

Importing records new credit consent for every borrower on the new loan. Make sure each borrower has authorized a credit pull for the new application. See Before you import: borrower consent.
4

Import the file

Upload the file to POST /api/mismo-import as described in Making the request. The import creates a new deal and a new loan. Save the new loan_id and import_id.
5

Review the import report and finish the new loan

Read the import report and work through the common follow-ups. Then make the changes that are the reason for the re-application, such as a new subject property, on the new loan with the usual GraphQL mutations.
What the new loan does not inherit from the existing one:
  • Credit. The credit report, scores and liabilities stay on the existing loan. Pull credit again on the new loan, and link mortgages to owned properties afterwards.
  • Pricing, rate lock and disclosures. Price the new loan from scratch. A rate lock on the existing loan doesn’t transfer.
  • Documents, tasks and conditions. Upload the documents the new loan needs. See Working with documents.
  • The loan officer. Assign one on the new loan.
  • Anything the import doesn’t read. The export contains data the import drops, such as the existing loan’s liabilities. Expect a CRITICAL finding for each owned property the export shows a mortgage on, until you link the mortgage on the new loan.
The existing loan stays as it is. Importing doesn’t withdraw, archive or otherwise change it. Close it out according to your own process, so that the borrower doesn’t have two active applications.
Make your changes on the new loan after the import, rather than by editing the exported XML. Editing MISMO XML by hand is easy to get wrong, and a malformed file is rejected.

Errors

Error responses have a JSON body with this shape:
A failed import creates nothing. No deal, loan, borrower or report is left behind when the request returns an error. You can fix the file and send it again without cleaning up first.

Import error codes

Other errors

These come from the request itself rather than from the file. They carry no code. Responses to authenticated requests carry X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (a Unix timestamp in seconds) and X-RateLimit-Policy headers, so you can slow down before you hit the limit. 401 and 403 responses don’t carry them.
Send a multipart request. The endpoint only accepts multipart/form-data. A request with any other body, such as raw XML or JSON, currently fails with 500 MISMO_UPLOAD_INTERNAL rather than a 400. If every request fails that way, check how the request body is built first.

Retries and duplicates

The endpoint is not idempotent. Every successful request creates a new deal and loan, even when the file is identical to one you’ve already imported. There is no idempotency key.
  • After 429, 500 or 503, retry with backoff. Honor Retry-After when it is present. Nothing was created by the failed request.
  • After a 400 or 413, don’t retry until you’ve changed the file or the request. They fail the same way every time.
  • After a timeout or dropped connection with no response, the import may still have completed. Before you retry, check whether the loan was already created, for example by listing your most recent deals. Otherwise you may end up with duplicates.
  • Never retry after a success. A second call creates a second loan.
Large files take longer to import than most API calls. A request can wait up to 20 seconds for a free import slot (after which it gets 503 MISMO_UPLOAD_AT_CAPACITY), and reading the file is stopped after 45 seconds (500 MISMO_UPLOAD_INTERNAL). Saving the loan comes after that. Set a client timeout comfortably above the total. The examples above use 120 seconds.

What beta means for your integration

While the endpoint is in beta:
  • The contract may change, including in ways that aren’t backward compatible. This covers the response fields, the error codes and the import report. Check the changelog for updates.
  • missing_fields will be removed. Build on import_id and the import report instead.
  • New error codes and report values may be added. Handle an unknown code by its HTTP status: an unknown 4xx code means the file or request was rejected, and an unknown 5xx code means a failure on Pylon’s side. Handle an unknown reason or severity as “review this finding”.
  • New fields may be added to responses. Ignore fields you don’t recognize instead of failing on them.
  • Fewer findings over time. As more of the MISMO format is imported, files that produce findings today will produce fewer. Don’t hard-code a list of expected findings.
  • Review imported loans. Check imported data before you rely on it for pricing or disclosures, especially for files from a source system you haven’t imported from before.
If an import produces a loan that doesn’t match its file, or rejects a file you believe is valid, contact Pylon support with the loan_id, import_id or error_id. Don’t send the file itself unless support asks for it, because MISMO files contain borrowers’ personal information.

Complete integration guide

Build a loan field by field with GraphQL instead, and see the steps that follow loan creation.

Working with documents

Upload the loan’s supporting documents after the import.